File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
app/code/Magento/Store/Model Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- *
4
3
* Copyright © Magento, Inc. All rights reserved.
5
4
* See COPYING.txt for license details.
6
5
*/
11
10
use Magento \Store \Api \Data \StoreInterface ;
12
11
use Magento \Store \Api \StoreCookieManagerInterface ;
13
12
13
+ /**
14
+ * DTO class to work with cookies.
15
+ */
14
16
class StoreCookieManager implements StoreCookieManagerInterface
15
17
{
16
18
/**
17
- * Cookie name
19
+ * @var string
18
20
*/
19
21
const COOKIE_NAME = 'store ' ;
20
22
@@ -41,28 +43,28 @@ public function __construct(
41
43
}
42
44
43
45
/**
44
- * { @inheritdoc}
46
+ * @inheritdoc
45
47
*/
46
48
public function getStoreCodeFromCookie ()
47
49
{
48
50
return $ this ->cookieManager ->getCookie (self ::COOKIE_NAME );
49
51
}
50
52
51
53
/**
52
- * { @inheritdoc}
54
+ * @inheritdoc
53
55
*/
54
56
public function setStoreCookie (StoreInterface $ store )
55
57
{
56
58
$ cookieMetadata = $ this ->cookieMetadataFactory ->createPublicCookieMetadata ()
57
- ->setHttpOnly (true )
59
+ ->setHttpOnly (false )
58
60
->setDurationOneYear ()
59
61
->setPath ($ store ->getStorePath ());
60
62
61
63
$ this ->cookieManager ->setPublicCookie (self ::COOKIE_NAME , $ store ->getCode (), $ cookieMetadata );
62
64
}
63
65
64
66
/**
65
- * { @inheritdoc}
67
+ * @inheritdoc
66
68
*/
67
69
public function deleteStoreCookie (StoreInterface $ store )
68
70
{
You can’t perform that action at this time.
0 commit comments