本文整理汇总了PHP中eZContentCacheManager::clearObjectViewCacheArray方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentCacheManager::clearObjectViewCacheArray方法的具体用法?PHP eZContentCacheManager::clearObjectViewCacheArray怎么用?PHP eZContentCacheManager::clearObjectViewCacheArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZContentCacheManager
的用法示例。
在下文中一共展示了eZContentCacheManager::clearObjectViewCacheArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fixReverseRelations
/**
* Fixes reverse relations
*
* @see eZObjectRelationListType::fixRelatedObjectItem()
*
* @param int $objectID
* @param string|bool $mode See eZObjectRelationListType::fixRelatedObjectItem() for valid modes
*/
static function fixReverseRelations( $objectID, $mode = false )
{
$db = eZDB::instance();
$objectID = (int) $objectID;
// Finds all the attributes that store relations to the given object.
$result = $db->arrayQuery( "SELECT attr.*
FROM ezcontentobject_link link,
ezcontentobject_attribute attr
WHERE link.from_contentobject_id=attr.contentobject_id AND
link.from_contentobject_version=attr.version AND
link.contentclassattribute_id=attr.contentclassattribute_id AND
link.to_contentobject_id=$objectID" );
if ( count( $result ) > 0 )
{
$objectIDList = array();
foreach( $result as $row )
{
$attr = new eZContentObjectAttribute( $row );
$dataType = $attr->dataType();
$dataType->fixRelatedObjectItem( $attr, $objectID, $mode );
$objectIDList[] = $attr->attribute( 'contentobject_id' );
}
if ( eZINI::instance()->variable( 'ContentSettings', 'ViewCaching' ) === 'enabled' )
eZContentCacheManager::clearObjectViewCacheArray( $objectIDList );
}
}