当前位置: 首页>>代码示例>>PHP>>正文


PHP eZContentCacheManager::clearTemplateBlockCache方法代码示例

本文整理汇总了PHP中eZContentCacheManager::clearTemplateBlockCache方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentCacheManager::clearTemplateBlockCache方法的具体用法?PHP eZContentCacheManager::clearTemplateBlockCache怎么用?PHP eZContentCacheManager::clearTemplateBlockCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在eZContentCacheManager的用法示例。


在下文中一共展示了eZContentCacheManager::clearTemplateBlockCache方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: clearContentCache

    static function clearContentCache( $objectIDList, $versionNum = true, $additionalNodeList = false )
    {
    	if ( !is_array($objectIDList) )
    	{
    		return false;
    	}
        eZDebug::accumulatorStart( 'check_cache', '', 'Check cache' );

        KeZCacheManager::clearObjectViewCache( $objectIDList, $versionNum, $additionalNodeList );
        foreach ($objectIDList as $objectID)
        {
        	eZContentCacheManager::clearTemplateBlockCache( $objectID );
        }

        // Clear cached path strings of content SSL zones.
        eZSSLZone::clearCache();

        eZDebug::accumulatorStop( 'check_cache' );
        return true;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:20,代码来源:kezcachemanager.php

示例2: restoreSiteStyle

 /**
  * Restore site style to given version
  *
  * @static
  */
 public static function restoreSiteStyle()
 {
     $params = self::getPostParams();
     $siteStyleVerParam = isset($params['sitestyle_version']) ? $params['sitestyle_version'] : array();
     $siteStyleVerID = isset($siteStyleVerParam['id']) ? $siteStyleVerParam['id'] : null;
     $objectID = isset($params['object_id']) ? $params['object_id'] : null;
     $siteStyleVersion = ezcsseSiteStyleVersion::fetchObject(ezcsseSiteStyleVersion::definition(), null, array('id' => $siteStyleVerID));
     $siteStyle = ezcsseSiteStyle::fetchObject(ezcsseSiteStyle::definition(), null, array('id' => $siteStyleVersion->attribute('sitestyle_id')));
     $currentVersion = $siteStyle->attribute('current_version');
     $siteStyleDef = ezcsseSiteStyleDefinition::fetchObject(ezcsseSiteStyleDefinition::definition(), null, array('sitestyle_id' => $siteStyleVersion->attribute('sitestyle_id'), 'version' => $siteStyleVersion->attribute('version')));
     $style = $siteStyleDef->attribute('style');
     $newSiteStyleVersion = new ezcsseSiteStyleVersion();
     $newSiteStyleVersion->setAttribute('sitestyle_id', $siteStyle->attribute('id'));
     $newSiteStyleVersion->setAttribute('version', $currentVersion + 1);
     $newSiteStyleVersion->setAttribute('created', time());
     $newSiteStyleVersion->setAttribute('modified', time());
     $newSiteStyleVersion->store();
     $newSiteStyleDef = new ezcsseSiteStyleDefinition();
     $newSiteStyleDef->setAttribute('sitestyle_id', $siteStyle->attribute('id'));
     $newSiteStyleDef->setAttribute('version', $currentVersion + 1);
     $newSiteStyleDef->setAttribute('style', $style);
     $newSiteStyleDef->store();
     $siteStyle->setAttribute('current_version', $currentVersion + 1);
     $siteStyle->store();
     $style = ezcsseStyle::createFromXML($style);
     if ($objectID) {
         eZContentCacheManager::clearTemplateBlockCache($objectID);
     }
     return $style->toJSON();
 }
开发者ID:netbliss,项目名称:ezstyleeditor,代码行数:35,代码来源:ezcsseservercallfunctions.php


注:本文中的eZContentCacheManager::clearTemplateBlockCache方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。