@@ -9,10 +9,10 @@ use Magento\Framework\App\ObjectManager;
99/** @var \Magento\Customer\Block\CustomerData $block */
1010
1111// 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 () ??
1616 ObjectManager::getInstance ()->get (JsonSerializer::class);
1717$ customerDataUrl = $ block ->getCustomerDataUrl ('customer/account/updateSession ' );
1818$ expirableSectionNames = $ block ->getExpirableSectionNames ();
@@ -23,12 +23,12 @@ $expirableSectionNames = $block->getExpirableSectionNames();
2323 "Magento_Customer/js/customer-data": {
2424 "sectionLoadUrl": "<?= $ block ->escapeJs ($ block ->getCustomerDataUrl ('customer/section/load ' )) ?> ",
2525 "expirableSectionLifetime": <?= (int )$ block ->getExpirableSectionLifetime () ?> ,
26- "expirableSectionNames": <?= /* @noEscape */ $ jsonSerializerViewModel ->jsonEncode (
26+ "expirableSectionNames": <?= /* @noEscape */ $ jsonSerializer ->jsonEncode (
2727 $ expirableSectionNames
2828 ) ?> ,
2929 "cookieLifeTime": "<?= $ block ->escapeJs ($ block ->getCookieLifeTime ()) ?> ",
3030 "updateSessionUrl": "<?= $ block ->escapeJs ($ customerDataUrl ) ?> ",
31- "isLoggedIn": "<?= /* @noEscape */ $ authViewModel ->isLoggedIn () ?> "
31+ "isLoggedIn": "<?= /* @noEscape */ $ auth ->isLoggedIn () ?> "
3232 }
3333 }
3434 }
0 commit comments