@@ -9,10 +9,10 @@ use Magento\Framework\App\ObjectManager;
9
9
/** @var \Magento\Customer\Block\CustomerData $block */
10
10
11
11
// phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper
12
- /** @var Auth $authViewModel */
13
- $ authViewModel = $ block ->getAuthViewModel () ?? ObjectManager::getInstance ()->get (Auth::class);
14
- /** @var JsonSerializer $jsonSerializerViewModel */
15
- $ jsonSerializerViewModel = $ block ->getJsonSerializerViewModel () ??
12
+ /** @var Auth $auth */
13
+ $ auth = $ block ->getAuth () ?? ObjectManager::getInstance ()->get (Auth::class);
14
+ /** @var JsonSerializer $jsonSerializer */
15
+ $ jsonSerializer = $ block ->getJsonSerializer () ??
16
16
ObjectManager::getInstance ()->get (JsonSerializer::class);
17
17
$ customerDataUrl = $ block ->getCustomerDataUrl ('customer/account/updateSession ' );
18
18
$ expirableSectionNames = $ block ->getExpirableSectionNames ();
@@ -23,12 +23,12 @@ $expirableSectionNames = $block->getExpirableSectionNames();
23
23
"Magento_Customer/js/customer-data": {
24
24
"sectionLoadUrl": "<?= $ block ->escapeJs ($ block ->getCustomerDataUrl ('customer/section/load ' )) ?> ",
25
25
"expirableSectionLifetime": <?= (int )$ block ->getExpirableSectionLifetime () ?> ,
26
- "expirableSectionNames": <?= /* @noEscape */ $ jsonSerializerViewModel ->jsonEncode (
26
+ "expirableSectionNames": <?= /* @noEscape */ $ jsonSerializer ->jsonEncode (
27
27
$ expirableSectionNames
28
28
) ?> ,
29
29
"cookieLifeTime": "<?= $ block ->escapeJs ($ block ->getCookieLifeTime ()) ?> ",
30
30
"updateSessionUrl": "<?= $ block ->escapeJs ($ customerDataUrl ) ?> ",
31
- "isLoggedIn": "<?= /* @noEscape */ $ authViewModel ->isLoggedIn () ?> "
31
+ "isLoggedIn": "<?= /* @noEscape */ $ auth ->isLoggedIn () ?> "
32
32
}
33
33
}
34
34
}
0 commit comments