section-config.phtml 679 B

123456789101112131415161718192021
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /** @var \Magento\Customer\Block\SectionConfig $block */
  7. ?>
  8. <script type="text/x-magento-init">
  9. <?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode([
  10. '*' => ['Magento_Customer/js/section-config' => [
  11. 'sections' => $block->getSections(),
  12. 'clientSideSections' => $block->getClientSideSections(),
  13. 'baseUrls' => array_unique([
  14. $block->getUrl(null, ['_secure' => true]),
  15. $block->getUrl(null, ['_secure' => false]),
  16. ]),
  17. ]],
  18. ]);
  19. ?>
  20. </script>