Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
notices.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
10 ?>
11 <?php if ($this->helper(\Magento\Cookie\Helper\Cookie::class)->isCookieRestrictionModeEnabled()): ?>
12  <div role="alertdialog"
13  tabindex="-1"
14  class="message global cookie"
15  id="notice-cookie-block"
16  style="display: none;">
17  <div role="document" class="content" tabindex="0">
18  <p>
19  <strong><?= $block->escapeHtml(__('We use cookies to make your experience better.')) ?></strong>
20  <span><?= $block->escapeHtml(__('To comply with the new e-Privacy directive, we need to ask for your consent to set the cookies.')) ?></span>
21  <?= $block->escapeHtml(__('<a href="%1">Learn more</a>.', $block->getPrivacyPolicyLink()), ['a']) ?>
22  </p>
23  <div class="actions">
24  <button id="btn-cookie-allow" class="action allow primary">
25  <span><?= $block->escapeHtml(__('Allow Cookies')) ?></span>
26  </button>
27  </div>
28  </div>
29  </div>
30  <script type="text/x-magento-init">
31  {
32  "#notice-cookie-block": {
33  "cookieNotices": {
34  "cookieAllowButtonSelector": "#btn-cookie-allow",
35  "cookieName": "<?= /* @noEscape */ \Magento\Cookie\Helper\Cookie::IS_USER_ALLOWED_SAVE_COOKIE ?>",
36  "cookieValue": <?= /* @noEscape */ $this->helper(\Magento\Cookie\Helper\Cookie::class)->getAcceptedSaveCookiesWebsiteIds() ?>,
37  "cookieLifetime": <?= /* @noEscape */ $this->helper(\Magento\Cookie\Helper\Cookie::class)->getCookieRestrictionLifetime() ?>,
38  "noCookiesUrl": "<?= $block->escapeJs($block->escapeUrl($block->getUrl('cookie/index/noCookies'))) ?>"
39  }
40  }
41  }
42  </script>
43 <?php endif; ?>
__()
Definition: __.php:13
$block
Definition: block.php:8
if( $block->displayNoscriptNotice())( 'JavaScript may be disabled in your browser.') ?></strong ><? endif
Definition: notices.phtml:15