Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-page-cache
Model
Layout
MergePlugin.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\PageCache\Model\Layout
;
7
8
use
Magento\Framework\View\EntitySpecificHandlesList
;
9
13
class
MergePlugin
14
{
18
private
$entitySpecificHandlesList;
19
25
public
function
__construct
(
26
EntitySpecificHandlesList
$entitySpecificHandlesList
27
) {
28
$this->entitySpecificHandlesList = $entitySpecificHandlesList;
29
}
30
42
public
function
beforeValidateUpdate
(\
Magento
\Framework\View\Model\Layout\Merge $subject,
$handle
, $updateXml)
43
{
44
if
(in_array(
$handle
, $this->entitySpecificHandlesList->getHandles())
45
&& (strpos($updateXml,
'ttl='
) !==
false
)
46
) {
47
throw
new \LogicException(
48
"Handle '{$handle}' must not contain blocks with 'ttl' attribute specified. "
49
.
"Otherwise, these blocks will be treated as ESI by Varnish, however will not be shared between pages "
50
.
"because handle '{$handle}' is not generic. Such blocks will not be rendered on the page"
51
);
52
}
53
return
null
;
54
}
55
}
Magento\PageCache\Model\Layout
Definition:
MergeTest.php:6
Magento\PageCache\Model\Layout\MergePlugin\beforeValidateUpdate
beforeValidateUpdate(\Magento\Framework\View\Model\Layout\Merge $subject, $handle, $updateXml)
Definition:
MergePlugin.php:42
Magento\Framework\View\EntitySpecificHandlesList
Definition:
EntitySpecificHandlesList.php:11
Magento\PageCache\Model\Layout\MergePlugin
Definition:
MergePlugin.php:13
Magento\PageCache\Model\Layout\MergePlugin\__construct
__construct(EntitySpecificHandlesList $entitySpecificHandlesList)
Definition:
MergePlugin.php:25
Magento
$handle
$handle
Definition:
payment_enc_cc.php:26