Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Data Fields | |
const | DESIGN_ABSTRACTION_CUSTOM = 'custom' |
const | DESIGN_ABSTRACTION_PAGE_LAYOUT = 'page_layout' |
const | XPATH_HANDLE_DECLARATION = '/layout[@design_abstraction]' |
const | TYPE_ATTRIBUTE = 'xsi:type' |
const | PAGE_LAYOUT_CACHE_SUFFIX = 'page_layout' |
Protected Member Functions | |
_getPageHandleNode ($handleName) | |
_validateMergedLayout ($cacheId, $layout) | |
_loadXmlString ($xmlString) | |
_merge ($handle) | |
_fetchPackageLayoutUpdates ($handle) | |
_fetchDbLayoutUpdates ($handle) | |
_substitutePlaceholders ($xmlString) | |
_fetchRecursiveUpdates ($updateXml) | |
generateCacheId ($suffix='') | |
_loadCache ($cacheId) | |
_saveCache ($data, $cacheId, array $cacheTags=[]) | |
_logXmlErrors ($fileName, $xmlErrors) | |
_getPhysicalTheme (\Magento\Framework\View\Design\ThemeInterface $theme) | |
_renderXmlAttributes (\SimpleXMLElement $node) | |
Protected Attributes | |
$layoutUpdatesCache | |
$updates = [] | |
$handles = [] | |
$pageHandles = [] | |
$subst = null | |
$cache | |
$layoutValidator | |
$logger | |
$pageLayout | |
$cacheSuffix | |
$allHandles = [] | |
$handleProcessing = 1 | |
$handleProcessed = 2 | |
Layout merge model @SuppressWarnings(PHPMD.TooManyFields) @SuppressWarnings(PHPMD.CouplingBetweenObjects)
__construct | ( | \Magento\Framework\View\DesignInterface | $design, |
\Magento\Framework\Url\ScopeResolverInterface | $scopeResolver, | ||
\Magento\Framework\View\File\CollectorInterface | $fileSource, | ||
\Magento\Framework\View\File\CollectorInterface | $pageLayoutFileSource, | ||
\Magento\Framework\App\State | $appState, | ||
\Magento\Framework\Cache\FrontendInterface | $cache, | ||
\Magento\Framework\View\Model\Layout\Update\Validator | $validator, | ||
\Psr\Log\LoggerInterface | $logger, | ||
ReadFactory | $readFactory, | ||
\Magento\Framework\View\Design\ThemeInterface | $theme = null , |
||
$cacheSuffix = '' , |
|||
LayoutCacheKeyInterface | $layoutCacheKey = null |
||
) |
Init merge model
\Magento\Framework\View\DesignInterface | $design | |
\Magento\Framework\Url\ScopeResolverInterface | $scopeResolver | |
\Magento\Framework\View\File\CollectorInterface | $fileSource | |
\Magento\Framework\View\File\CollectorInterface | $pageLayoutFileSource | |
\Magento\Framework\App\State | $appState | |
\Magento\Framework\Cache\FrontendInterface | $cache | |
\Magento\Framework\View\Model\Layout\Update\Validator | $validator | |
\Psr\Log\LoggerInterface | $logger | |
ReadFactory | $readFactory |
Definition at line 182 of file Merge.php.
__destruct | ( | ) |
Cleanup circular references
Destructor should be called explicitly in order to work around the PHP bug https://bugs.php.net/bug.php?id=62468
|
protected |
Fetch & add layout updates for the specified handle from the database
string | $handle |
Definition at line 568 of file Merge.php.
|
protected |
Add updates for the specified handle
string | $handle |
Definition at line 546 of file Merge.php.
|
protected |
|
protected |
Get handle xml node by handle name
string | $handleName |
Definition at line 347 of file Merge.php.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Merge layout update by handle
string | $handle |
Definition at line 525 of file Merge.php.
|
protected |
|
protected |
|
protected |
Substitute placeholders {{placeholder_name}} with their values in XML string
string | $xmlString |
Definition at line 614 of file Merge.php.
|
protected |
Validate merged layout
string | $cacheId | |
string | $layout |
Definition at line 471 of file Merge.php.
addHandle | ( | $handleName | ) |
Add handle(s) to update
array | string | $handleName |
Implements ProcessorInterface.
Definition at line 250 of file Merge.php.
addPageHandles | ( | array | $handlesToTry | ) |
Add the first existing (declared in layout updates) page handle along with all parents to the update. Return whether any page handles have been added or not.
string[] | $handlesToTry |
Implements ProcessorInterface.
Definition at line 291 of file Merge.php.
addUpdate | ( | $update | ) |
asArray | ( | ) |
Get all registered updates as array
Implements ProcessorInterface.
Definition at line 229 of file Merge.php.
asSimplexml | ( | ) |
Get layout updates as \Magento\Framework\View\Layout\Element object
Implements ProcessorInterface.
Definition at line 498 of file Merge.php.
asString | ( | ) |
|
protected |
getCacheId | ( | ) |
Return cache ID based current area/package/theme/store and handles
Implements ProcessorInterface.
Definition at line 930 of file Merge.php.
getDbUpdateString | ( | $handle | ) |
getFileLayoutUpdatesXml | ( | ) |
Retrieve already merged layout updates from files for specified area/theme/package/store
Implements ProcessorInterface.
Definition at line 667 of file Merge.php.
getHandles | ( | ) |
getPageHandles | ( | ) |
getPageHandleType | ( | $handleName | ) |
Retrieve the type of a page handle
string | $handleName |
Definition at line 415 of file Merge.php.
getScope | ( | ) |
getTheme | ( | ) |
Retrieve theme
isCustomerDesignAbstraction | ( | array | $abstraction | ) |
Check custom design abstractions that exist in the system
array | $abstraction |
Implements ProcessorInterface.
Definition at line 886 of file Merge.php.
isLayoutDefined | ( | ) |
Check current handles if layout was defined on it
Definition at line 330 of file Merge.php.
isPageLayoutDesignAbstraction | ( | array | $abstraction | ) |
Check page_layout design abstractions that exist in the system
array | $abstraction |
Implements ProcessorInterface.
Definition at line 897 of file Merge.php.
load | ( | $handles = [] | ) |
Load layout updates by handles
array | string | $handles |
Implements ProcessorInterface.
Definition at line 428 of file Merge.php.
pageHandleExists | ( | $handleName | ) |
Whether a page handle is declared in the system or not
string | $handleName |
Definition at line 312 of file Merge.php.
removeHandle | ( | $handleName | ) |
validateUpdate | ( | $handle, | |
$updateXml | |||
) |
const DESIGN_ABSTRACTION_CUSTOM = 'custom' |
const DESIGN_ABSTRACTION_PAGE_LAYOUT = 'page_layout' |
const PAGE_LAYOUT_CACHE_SUFFIX = 'page_layout' |
const TYPE_ATTRIBUTE = 'xsi:type' |
const XPATH_HANDLE_DECLARATION = '/layout[@design_abstraction]' |