File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
app/code/Magento/Cookie/View/frontend/templates/html
dev/tests/static/testsuite/Magento/Test/Legacy Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 8
8
9
9
?>
10
10
<?php /** @var \Magento\Cookie\Block\Html\Notices $block */ ?>
11
- <?php if ($ block ->helper ('Magento\Cookie\Helper\Cookie ' )->isUserNotAllowSaveCookie ()): ?>
11
+ <?php if ($ this ->helper ('Magento\Cookie\Helper\Cookie ' )->isUserNotAllowSaveCookie ()): ?>
12
12
<div class="message global cookie" id="notice-cookie-block" style="display: none">
13
13
<div class="content">
14
14
<p>
32
32
$('#notice-cookie-block').mage('cookieNotices', {
33
33
cookieAllowButtonSelector: '#btn-cookie-allow',
34
34
cookieName: '<?php echo \Magento \Cookie \Helper \Cookie::IS_USER_ALLOWED_SAVE_COOKIE ?> ',
35
- cookieValue: '<?php echo $ block ->helper ('Magento\Cookie\Helper\Cookie ' )->getAcceptedSaveCookiesWebsiteIds () ?> ',
36
- cookieLifetime: <?php echo $ block ->helper ('Magento\Cookie\Helper\Cookie ' )->getCookieRestrictionLifetime ()?> ,
35
+ cookieValue: '<?php echo $ this ->helper ('Magento\Cookie\Helper\Cookie ' )->getAcceptedSaveCookiesWebsiteIds () ?> ',
36
+ cookieLifetime: <?php echo $ this ->helper ('Magento\Cookie\Helper\Cookie ' )->getCookieRestrictionLifetime ()?> ,
37
37
noCookiesUrl: '<?php echo $ block ->getUrl ('cookie/index/noCookies ' ) ?> '
38
38
});
39
39
// ]]>
Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ public function testBlockVariableInsteadOfThis()
14
14
$ invoker = new \Magento \Framework \Test \Utility \AggregateInvoker ($ this );
15
15
$ invoker (
16
16
/**
17
- * Test usage of methods and variables in template throught $this
17
+ * Test usage of methods and variables in template through $this
18
18
*
19
19
* @param string $file
20
20
*/
21
21
function ($ file ) {
22
22
$ this ->assertNotRegExp (
23
23
'/this->(?!helper)\S*/iS ' ,
24
24
file_get_contents ($ file ),
25
- 'Access to members and methods of Block class throught $this is ' .
25
+ 'Access to members and methods of Block class through $this is ' .
26
26
'obsolete in phtml templates. Use only $block instead of $this. '
27
27
);
28
28
},
You can’t perform that action at this time.
0 commit comments