本文整理汇总了PHP中Magento\Framework\View\Element\Template::getCacheKeyInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Template::getCacheKeyInfo方法的具体用法?PHP Template::getCacheKeyInfo怎么用?PHP Template::getCacheKeyInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Framework\View\Element\Template
的用法示例。
在下文中一共展示了Template::getCacheKeyInfo方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCacheKeyInfo
/**
* Get cache key informative items
*
* Provide string array key to share specific info item with FPC placeholder
*
* @return array
*/
public function getCacheKeyInfo()
{
if ($this->_cacheKeyInfo === null) {
$this->_cacheKeyInfo = parent::getCacheKeyInfo() + ['crumbs' => base64_encode(serialize($this->_crumbs)), 'name' => $this->getNameInLayout()];
}
return $this->_cacheKeyInfo;
}
示例2: getCacheKeyInfo
/**
* Get cache key informative items
*
* Provide string array key to share specific info item with FPC placeholder
*
* @return array
*/
public function getCacheKeyInfo()
{
if (is_null($this->_cacheKeyInfo)) {
$this->_cacheKeyInfo = parent::getCacheKeyInfo() + array('crumbs' => base64_encode(serialize($this->_crumbs)), 'name' => $this->getNameInLayout());
}
return $this->_cacheKeyInfo;
}
示例3: testGetCacheKeyInfo
public function testGetCacheKeyInfo()
{
$this->assertArrayHasKey('template', $this->_block->getCacheKeyInfo());
}
示例4: getCacheKeyInfo
/**
* Get cache key informative items
*
* @return array
*/
public function getCacheKeyInfo()
{
$keyInfo = parent::getCacheKeyInfo();
$keyInfo[] = $this->getUrl('*/*/*', ['_current' => true, '_query' => '']);
return $keyInfo;
}
示例5: testGetCacheKeyInfo
public function testGetCacheKeyInfo()
{
$this->assertEquals(['BLOCK_TPL', 'storeCode', null, 'base_url' => 'baseUrl', 'template' => 'template.phtml'], $this->block->getCacheKeyInfo());
}