本文整理匯總了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 );
}
}