本文整理匯總了PHP中Magento\Framework\View\Page\Config::getPageLayout方法的典型用法代碼示例。如果您正苦於以下問題:PHP Config::getPageLayout方法的具體用法?PHP Config::getPageLayout怎麽用?PHP Config::getPageLayout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Framework\View\Page\Config
的用法示例。
在下文中一共展示了Config::getPageLayout方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getPageLayout
/**
* @return string
*/
protected function getPageLayout()
{
return $this->pageConfig->getPageLayout() ?: $this->getLayout()->getUpdate()->getPageLayout();
}
示例2: getPageLayout
/**
* {@inheritdoc}
*/
public function getPageLayout()
{
$pluginInfo = $this->pluginList->getNext($this->subjectType, 'getPageLayout');
if (!$pluginInfo) {
return parent::getPageLayout();
} else {
return $this->___callPlugins('getPageLayout', func_get_args(), $pluginInfo);
}
}
示例3: load
/**
* Load layout updates by handles
*
* @param array|string $handles
* @throws \Magento\Framework\Exception
* @return $this
*/
public function load($handles = array())
{
if (is_string($handles)) {
$handles = array($handles);
} elseif (!is_array($handles)) {
throw new \Magento\Framework\Exception('Invalid layout update handle');
}
$this->addHandle($handles);
$cacheId = $this->_getCacheId(md5(implode('|', $this->getHandles())));
$cacheIdPageLayout = $cacheId . '_' . self::PAGE_LAYOUT_CACHE_SUFFIX . '_' . $this->pageConfig->getPageLayout();
$result = $this->_loadCache($cacheId);
if ($result) {
$this->addUpdate($result);
$this->loadLayoutCache($cacheIdPageLayout);
return $this;
}
foreach ($this->getHandles() as $handle) {
$this->_merge($handle);
}
$this->processLayoutPage();
$pageLayoutHandle = $this->pageConfig->getPageLayout();
if ($this->pageLayout) {
$this->_merge($pageLayoutHandle);
$this->addHandle($pageLayoutHandle);
$this->_saveCache($pageLayoutHandle, $cacheIdPageLayout);
}
$layout = $this->asString();
$this->_validateMergedLayout($cacheId, $layout);
$this->_saveCache($layout, $cacheId, $this->getHandles());
return $this;
}