1
1
<?php
2
2
/**
3
- * Copyright © Magento, Inc. All rights reserved.
4
- * See COPYING.txt for license details .
3
+ * Copyright 2015 Adobe
4
+ * All Rights Reserved .
5
5
*/
6
6
use Magento \Customer \ViewModel \Customer \Data ;
7
7
use Magento \Customer \ViewModel \CookieSettings ;
8
8
9
- /** @var \Magento\Customer\Block\CustomerData $block */
9
+ /**
10
+ * @var \Magento\Customer\Block\CustomerData $block
11
+ * @var \Magento\Framework\Escaper $escaper
12
+ */
10
13
11
14
// phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper
12
15
/** @var Auth $auth */
@@ -22,14 +25,14 @@ $cookieSettings = $block->getCookieSettings();
22
25
{
23
26
"*": {
24
27
"Magento_Customer/js/customer-data": {
25
- "sectionLoadUrl": "<?= $ block ->escapeJs ($ block ->getCustomerDataUrl ('customer/section/load ' )) ?> ",
28
+ "sectionLoadUrl": "<?= $ escaper ->escapeJs ($ block ->getCustomerDataUrl ('customer/section/load ' )) ?> ",
26
29
"expirableSectionLifetime": <?= (int )$ block ->getExpirableSectionLifetime () ?> ,
27
30
"expirableSectionNames": <?= /* @noEscape */ $ jsonSerializer ->serialize (
28
31
$ expirableSectionNames
29
32
) ?> ,
30
- "cookieLifeTime": "<?= $ block ->escapeJs ($ block ->getCookieLifeTime ()) ?> ",
31
- "cookieDomain": "<?= $ block ->escapeJs ($ cookieSettings ->getCookieDomain ()) ?> ",
32
- "updateSessionUrl": "<?= $ block ->escapeJs ($ customerDataUrl ) ?> ",
33
+ "cookieLifeTime": "<?= $ escaper ->escapeJs ($ block ->getCookieLifeTime ()) ?> ",
34
+ "cookieDomain": "<?= $ escaper ->escapeJs ($ cookieSettings ->getCookieDomain ()) ?> ",
35
+ "updateSessionUrl": "<?= $ escaper ->escapeJs ($ customerDataUrl ) ?> ",
33
36
"isLoggedIn": "<?= /* @noEscape */ $ auth ->isLoggedIn () ?> "
34
37
}
35
38
}
0 commit comments