本文整理汇总了PHP中Mage_Core_Block_Template::getCacheKeyInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Block_Template::getCacheKeyInfo方法的具体用法?PHP Mage_Core_Block_Template::getCacheKeyInfo怎么用?PHP Mage_Core_Block_Template::getCacheKeyInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Block_Template
的用法示例。
在下文中一共展示了Mage_Core_Block_Template::getCacheKeyInfo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCacheKeyInfo
/**
* Get cache key informative items
*
* @return array
*/
public function getCacheKeyInfo()
{
if (null === $this->_cacheKeyInfo) {
$this->_cacheKeyInfo = parent::getCacheKeyInfo() + array('crumbs' => base64_encode(serialize($this->_crumbs)), 'name' => $this->getNameInLayout());
}
return $this->_cacheKeyInfo;
}
示例2: getCacheKeyInfo
public function getCacheKeyInfo()
{
$info = parent::getCacheKeyInfo();
if (Mage::registry('product')) {
$info['product_id'] = Mage::registry('product')->getId();
}
return $info;
}
示例3: getCacheKeyInfo
/**
* Get cache key informative items
*
* @return array
*/
public function getCacheKeyInfo()
{
$info = parent::getCacheKeyInfo();
if ($id = $this->getUniqueId()) {
$info['unique_id'] = (string) $id;
}
return $info;
}
示例4: getCacheKeyInfo
public function getCacheKeyInfo()
{
$id = $this->getData('slideshow_id');
if ($id) {
$result = array('cdz_revslideshow', Mage::app()->getStore()->getId(), (int) Mage::app()->getStore()->isCurrentlySecure(), Mage::getDesign()->getPackageName(), Mage::getDesign()->getTheme('template'), serialize($this->getData()));
} else {
$result = parent::getCacheKeyInfo();
}
return $result;
}
示例5: getCacheKeyInfo
public function getCacheKeyInfo()
{
if (!($zip = Mage::registry('bloom_nations_zipcode'))) {
$zip = $_COOKIE['bloom_nations_zipcode'];
}
$info = parent::getCacheKeyInfo();
$info['zip'] = $zip;
$info['module'] = 'catView';
$info['category'] = Mage::registry('current_category')->getId();
return $info;
}
示例6: 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)) {
$links = array();
if (!empty($this->_links)) {
foreach ($this->_links as $position => $link) {
if ($link instanceof Varien_Object) {
$links[$position] = $link->getData();
}
}
}
$this->_cacheKeyInfo = parent::getCacheKeyInfo() + array('links' => base64_encode(serialize($links)), 'name' => $this->getNameInLayout());
}
return $this->_cacheKeyInfo;
}
示例7: getCacheKeyInfo
/**
* Get cache key informative items that must be preserved in cache placeholders
* for block to be rerendered by placeholder
*
* @return array
*/
public function getCacheKeyInfo()
{
$items = array('templates' => serialize($this->_templates));
$items = parent::getCacheKeyInfo() + $items;
return $items;
}
示例8: getCacheKeyInfo
/**
* Get cache key informative items that must be preserved in cache placeholders
* for block to be rerendered by placeholder
*
* @return array
*/
public function getCacheKeyInfo()
{
$items = array('name' => $this->getNameInLayout(), 'types' => $this->getTypes(), 'display_mode' => $this->getDisplayMode(), 'rotate' => (string) $this->getRotate(), 'banner_ids' => implode(',', $this->getBannerIds()), 'unique_id' => $this->getUniqueId());
$items = parent::getCacheKeyInfo() + $items;
return $items;
}
示例9: getCacheKeyInfo
/**
* Get Key pieces for caching block content
*
* @return array
*/
public function getCacheKeyInfo()
{
if ($this->hasData('cache_key_info')) {
return $this->getData('cache_key_info');
}
return parent::getCacheKeyInfo();
}
示例10: getCacheKeyInfo
/**
* Retrieve values of properties that unambiguously identify unique content
*
* @return array
*/
public function getCacheKeyInfo()
{
$result = parent::getCacheKeyInfo();
$blockId = $this->getBlockId();
if ($blockId) {
$result[] = $blockId;
}
return $result;
}
示例11: getCacheKeyInfo
public function getCacheKeyInfo()
{
return array_merge(parent::getCacheKeyInfo(), array(Mage::getDesign()->getPackageName(), Mage::getDesign()->getTheme('template'), Mage::getSingleton('customer/session')->getCustomerGroupId(), $this->getCategoryId()));
}
示例12: getCacheKeyInfo
/**
* {@inheritdoc}
*/
public function getCacheKeyInfo()
{
$info = parent::getCacheKeyInfo();
$blockId = $this->getBlockId();
if ($blockId) {
$info[] = 'CMSBLOCK_' . $blockId;
}
return $info;
}
示例13: testGetCacheKeyInfo
public function testGetCacheKeyInfo()
{
$this->assertArrayHasKey('template', $this->_block->getCacheKeyInfo());
}
示例14: getCacheKeyInfo
public function getCacheKeyInfo()
{
$design = Mage::getDesign();
return array_merge(parent::getCacheKeyInfo(), array($this->getData('uri'), $design->getTheme('layout'), $design->getTheme('locale')));
}
示例15: getCacheKeyInfo
public function getCacheKeyInfo()
{
return array_merge(parent::getCacheKeyInfo(), array('dialog_slider'));
}