Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezcontentobjectoperations.php
Go to the documentation of this file.
1 <?php
19 class eZContentObjectOperations
20 {
25 static function remove( $objectID, $removeSubtrees = true )
26 {
27 eZContentCacheManager::clearContentCacheIfNeeded( $objectID );
28
29 $object = eZContentObject::fetch( $objectID );
30 if ( !is_object( $object ) )
31 return false;
32
33 // TODO: Is content cache cleared for all objects in subtree ??
34
35 if ( $removeSubtrees )
36 {
37 $assignedNodes = $object->attribute( 'assigned_nodes' );
38 if ( count( $assignedNodes ) == 0 )
39 {
40 $object->purge();
41 eZContentObject::expireAllViewCache();
42 return true;
43 }
44 $assignedNodeIDArray = array();
45 foreach( $assignedNodes as $node )
46 {
47 $assignedNodeIDArray[] = $node->attribute( 'node_id' );
48 }
49 eZContentObjectTreeNode::removeSubtrees( $assignedNodeIDArray, false );
50 }
51 else
52 $object->purge();
53
54 return true;
55 }
56 }
57
58
59 ?>
eZContentCacheManager\clearContentCacheIfNeeded
static clearContentCacheIfNeeded( $objectID, $versionNum=true, $additionalNodeList=false)
Definition: ezcontentcachemanager.php:1062
eZContentObjectOperations
The class eZContentObjectOperations is a place where content object operations are encapsulated....
Definition: ezcontentobjectoperations.php:20
eZContentObjectTreeNode\removeSubtrees
static removeSubtrees( $deleteIDArray, $moveToTrash=true, $infoOnly=false)
Definition: ezcontentobjecttreenode.php:3847
eZContentObject\fetch
static fetch( $id, $asObject=true)
Definition: ezcontentobject.php:885
eZContentObject\expireAllViewCache
static expireAllViewCache()
Definition: ezcontentobject.php:5932
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.