eZContentObjectTreeNode Class Reference

The class eZContentObjectTreeNode does. More...

Inheritance diagram for eZContentObjectTreeNode:
eZPersistentObject eZContentObjectTrashNode

List of all members.

Public Member Functions

addChild ($contentobjectID, $nodeID=0, $asObject=false, $contentObjectVersion=false)
 assignSectionToSubTree ($nodeID, $sectionID, $oldSectionID=false)
availableClassesJsArray ()
 availableClassListJsArray ($parameters=false)
 calendar ($params=false, $nodeID=0)
canAddLocation ()
canCreate ()
canCreateClassList ($asObject=false, $includeFilter=true, $groupList=false, $fetchID=false)
canEdit ()
canHide ()
canMove ()
canMoveFrom ()
canMoveTo ($classID=false)
canPdf ()
canRead ()
canRemove ()
canRemoveLocation ()
canSwap ()
canViewEmbed ()
 checkAccess ($functionName, $originalClassID=false, $parentClassID=false, $returnAccessList=false, $language=false)
 checkPath ($path)
children ()
childrenByName ($name)
childrenCount ($checkPolicies=true)
 classAttributeIDByIdentifier ($identifier)
 classIDByIdentifier ($identifier)
classIdentifier ()
 classListFromPolicy ($policy, $allowedLanguageCodes=false)
className ()
 clearViewCacheForSubtree (&$node, $clearForRootNode=true)
contentObjectVersionObject ($asObject=true)
 create ($parentNodeID=null, $contentObjectID=null, $contentObjectVersion=0, $sortField=0, $sortOrder=true)
 createAttributeFilterSQLStrings (&$attributeFilter, &$sortingInfo)
 createClassFilteringSQLString ($classFilterType, &$classFilterArray)
 createExtendedAttributeFilterSQLStrings (&$extendedAttributeFilter)
 createGroupBySQLStrings (&$outGroupBySelectText, &$outGroupByText, $groupBy)
 createMainNodeConditionSQLString ($mainNodeOnly)
 createNodesConditionSQLStringFromPath ($nodePath, $includingLastNodeInThePath, $limit=false)
 createNotEqParentSQLString ($nodeID, $depth=false, $depthOperator= 'le')
 createObject ($contentClassID, $parentNodeID=2)
 createObjectNameFilterConditionSQLString ($filter)
 createPathConditionAndNotEqParentSQLStrings (&$outPathConditionStr, &$outNotEqParentStr, &$treeNode, $nodeID, $depth=false, $depthOperator= 'le')
 createPathConditionSQLString ($nodePath, $nodeDepth, $depth=false, $depthOperator= 'le')
 createPermissionCheckingSQL (&$limitationList, $treeTableName= 'ezcontentobject_tree', $tableAliasName= 'ezcontentobject_tree')
 createPermissionCheckingSQLString (&$limitationList)
 createShowInvisibleSQLString ($useSettings, $fetchHidden=true)
 createSortingSQLStrings ($sortList, $treeTableName= 'ezcontentobject_tree')
 createVersionNameJoinsSQLString ($useVersionName, $includeAnd=true, $onlyTranslated=false, $lang=false, $treeTableName= 'ezcontentobject_tree')
 createVersionNameTablesSQLString ($useVersionName)
 createVersionNameTargetsSQLString ($useVersionName)
creator ()
 currentLanguage ()
dataMap ()
 definition ()
 deleteNodeWhereParent ($node, $id)
 eZContentObjectTreeNode ($row=array())
 fetchAliasesFromNodeList ($nodeList)
 fetchByContentObjectID ($contentObjectID, $asObject=true, $contentObjectVersion=false)
fetchByCRC ($pathStr)
 fetchByPath ($pathString, $asObject=true)
 fetchByRemoteID ($remoteID, $asObject=true)
 fetchByURLPath ($pathString, $asObject=true)
 fetchList ($asObject=true, $offset=false, $limit=false)
 fetchListCount ()
fetchParent ()
fetchPath ()
findMainNode ($objectID, $asObject=false)
findMainNodeArray ($objectIDArray, $asObject=true)
 findNode ($parentNode, $id, $asObject=false, $remoteID=false)
 getClassesJsArray ($node=false, $includeFilter=true, $groupList=false, $fetchID=false, $classes=false)
 getLimitationList (&$limitation)
getName ($language=false)
 getParentNodeId ($nodeID)
 hasContentObject ()
hiddenInvisibleString ()
hiddenStatusString ()
 hideSubTree (&$node, $modifyRootNode=true)
isMain ()
 makeObjectsArray (&$array, $with_contentobject=true)
 move ($newParentNodeID, $nodeID=0)
object ()
pathArray ()
 pathWithNames ($nodeID=0)
remoteID ()
 remove ($nodeID=0)
 removeNodeFromTree ($moveToTrash=true)
 serialize ($options, $contentNodeIDArray, $topNodeIDArray)
 setContentObject ($object)
 setCurrentLanguage ($languageCode)
 setName ($name)
 setVersionByObjectID ($objectID, $newVersion)
 showInvisibleNodes ()
sortArray ()
 sortFieldID ($sortFieldName)
 sortFieldName ($sortOrder)
 store ()
subTree ($params=false, $nodeID=0)
subTreeCount ($params=array(), $nodeID=0)
 subTreeGroupByDateField ($field, $type)
 subTreeMultiPaths ($nodesParams, $listParams=NULL)
 subtreeSoleNodeCount ($params=array())
 unhideSubTree (&$node, $modifyRootNode=true)
 updateAndStoreModified ()
 updateNodeVisibility (&$node, &$parentNode, $recursive=true)
 updateSubTreePath ()
 updateURLAlias ()
url ()
urlAlias ()
viewCount ()

Static Public Member Functions

 dataTypeByClassAttributeID ($classAttributeID)
 fetch ($nodeID=false, $lang=false, $asObject=true, $conditions=false)
fetchClassIdentifierListByPathString ($nodePath, $withLastNode, $limit=false)
 fetchNode ($contentObjectID, $parentNodeID)
 fetchNodesByPathString ($nodePath, $withLastNode=false, $asObjects=true, $limit=false)
 parentDepthLimitationList ()
 removeSubtrees ($deleteIDArray, $moveToTrash=true, $infoOnly=false)
 sortArrayBySortFieldAndSortOrder ($sortField, $sortOrder)
 sortKeyByClassAttributeID ($classAttributeID)
 subtreeRemovalInformation ($deleteIDArray)
 unserialize ($contentNodeDOMNode, $contentObject, $version, $isMain, &$nodeList, &$options, $handlerType= 'ezcontentobject')
 updateMainNodeID ($mainNodeID, $objectID, $version=false, $parentMainNodeID)

Public Attributes

 $ClassIdentifier = null
 Contains the cached value of the class identifier.
 $ClassName = null
 $CurrentLanguage = false
 The current language for the node.
 $Name
 Name of the node.

Static Private Member Functions

 reverseRelatedCount ($nodeIDArray)

Detailed Description

The class eZContentObjectTreeNode does.


Some algorithms
----------
1. Adding new Node
Enter  1 - parent_node
       2 - contentobject_id,  ( that is like a node value )

(a) - get path_string, depth for parent node to built path_string  and to count depth for new one
(c) - calculating attributes for new node and inserting it
Returns node_id for added node


2. Deleting node ( or subtree )
Enter - node_id

3. Move subtree in tree
Enter node_id,new_parent_id


4. fetching subtree

Definition at line 70 of file ezcontentobjecttreenode.php.


Member Function Documentation

& eZContentObjectTreeNode::addChild ( contentobjectID,
nodeID = 0,
asObject = false,
contentObjectVersion = false 
)

Add a child to the object tree.

Parameters:
$contentobjectID The ID of the contentobject the child-node should point to.
$nodeID The ID of the parent-node to add child-node to, if 0 it uses $this.
$asObject If true it will return the new child-node as an object, if not it returns the ID.
$contentObjectVersion The version to use on the newly created child-node, if false it uses the current_version of the specified object.
Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 3644 of file ezcontentobjecttreenode.php.

Referenced by eZContentObject::addLocation(), and createObject().

eZContentObjectTreeNode::assignSectionToSubTree ( nodeID,
sectionID,
oldSectionID = false 
)

Will assign a section to the current node and all child objects. Only main node assignments will be updated.

Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 3094 of file ezcontentobjecttreenode.php.

Referenced by eZContentObjectTreeNodeOperations::move(), and updateMainNodeID().

& eZContentObjectTreeNode::availableClassesJsArray (  ) 

Definition at line 6244 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::availableClassListJsArray ( parameters = false  ) 
eZContentObjectTreeNode::calendar ( params = false,
nodeID = 0 
)
Returns:
The date/time list when object were published

Definition at line 2811 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::canAddLocation (  ) 
Returns:
true if current user can add object locations to current node.
See also:
checkAccess()

Definition at line 561 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::canCreate (  ) 
Returns:
true if the current user can create a new node as child of this node.
See also:
checkAccess().
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 469 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::canCreateClassList ( asObject = false,
includeFilter = true,
groupList = false,
fetchID = false 
)

Finds all classes that the current user can create objects from and returns. It is also possible to filter the list event more with $includeFilter and $groupList.

Parameters:
$asObject If true then it return eZContentClass objects, if not it will be an associative array with name and id keys.
$includeFilter If true then it will include only from class groups defined in $groupList, if not it will exclude those groups.
$groupList An array with class group IDs that should be used in filtering, use false if you do not wish to filter at all.
$id A unique name for the current fetch, this must be supplied when filtering is used if you want caching to work.

Definition at line 5270 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::canEdit (  ) 
Returns:
true if the node can be edited by the current user.
See also:
checkAccess().
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 425 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::canHide (  ) 
Returns:
true if the node can be hidden by the current user.
See also:
checkAccess().
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 453 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::canMove (  ) 

Check if the node can be moved. (actually checks 'edit' and 'remove' permissions)

Returns:
true if the node can be moved by the current user.
See also:
checkAccess().
Note:
The reference for the return value is required to workaround a bug with PHP references.
Deprecated:
The function canMove() is preferred since its naming is clearer.

Definition at line 503 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::canMoveFrom (  ) 

Check if the node can be moved. (actually checks 'edit' and 'remove' permissions)

Returns:
true if the node can be moved by the current user.
See also:
checkAccess().
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 515 of file ezcontentobjecttreenode.php.

Referenced by canMove().

& eZContentObjectTreeNode::canMoveTo ( classID = false  ) 
Returns:
true if a node of class $classID can be moved to the current node by the current user.
See also:
checkAccess().
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 531 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::canPdf (  ) 
Returns:
true if the current user can create a pdf of this content object.
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 392 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::canRead (  ) 
Returns:
true if the node can be read by the current user.
See also:
checkAccess().
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 377 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::canRemove (  ) 
Returns:
true if the node can be removed by the current user.
See also:
checkAccess().
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 485 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::canRemoveLocation (  ) 
Returns:
true if current user can add object locations to current node.

Definition at line 574 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::canSwap (  ) 
Returns:
true if a node can be swaped by the current user.
See also:
checkAccess().
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 547 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::canViewEmbed (  ) 
Returns:
true if the node can be viewed as embeded object by the current user.
See also:
checkAccess().
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 409 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::checkAccess ( functionName,
originalClassID = false,
parentClassID = false,
returnAccessList = false,
language = false 
)
eZContentObjectTreeNode::checkPath ( path  ) 

Check if a node with the same name already exists. If so create a $name + __x value.

Definition at line 3789 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::children (  ) 

Returns the first level children in sorted order.

Definition at line 2964 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::childrenByName ( name  ) 
Returns:
the children(s) of the current node as an array of eZContentObjectTreeNode objects

Definition at line 2917 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::childrenCount ( checkPolicies = true  ) 

Returns the number of children for the current node. $checkPolicies If true it will only include nodes which can be read using the current policies, if false all nodes are included in count.

Definition at line 2977 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::classAttributeIDByIdentifier ( identifier  ) 
Returns:
the ID of the class attribute with the given ID. False is returned if no class/attribute by that identifier is found. If multiple classes have the same identifier, the first found is returned.

Definition at line 268 of file ezcontentobjecttreenode.php.

Referenced by createAttributeFilterSQLStrings(), createSortingSQLStrings(), and subTreeCount().

eZContentObjectTreeNode::classIDByIdentifier ( identifier  ) 
Returns:
the ID of the class with the given ID. False is returned if no class by that identifier is found. If multiple classes have the same identifier, the first found is returned.

Definition at line 324 of file ezcontentobjecttreenode.php.

Referenced by createClassFilteringSQLString(), and subTreeCount().

& eZContentObjectTreeNode::classIdentifier (  ) 
Returns:
the cached value of the class identifier if it exists, it not it's fetched dynamically

Definition at line 5932 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::classListFromPolicy ( policy,
allowedLanguageCodes = false 
)

Definition at line 5101 of file ezcontentobjecttreenode.php.

Referenced by canCreateClassList().

& eZContentObjectTreeNode::className (  ) 
Returns:
the cached value of the class name if it exists, it not it's fetched dynamically

Definition at line 5952 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::clearViewCacheForSubtree ( &$  node,
clearForRootNode = true 
)

static

Returns:
true on success, false otherwise

Definition at line 6152 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::contentObjectVersionObject ( asObject = true  ) 

Definition at line 5867 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::create ( parentNodeID = null,
contentObjectID = null,
contentObjectVersion = 0,
sortField = 0,
sortOrder = true 
)

Creates a new tree node and returns it.

Parameters:
$parentNodeID The ID of the parent or null if the node is not known yet.
$contentObjectID The ID of the object it points to or null if it is not known yet.
$contentObjectVersion The version of the object or 0 if not known yet.
$sortField Number describing the field to sort by, or 0 if not known yet.
$sortOrder Which way to sort, true means ascending while false is descending.
Note:
The attribute remote_id will get an automatic and unique value.

Definition at line 203 of file ezcontentobjecttreenode.php.

Referenced by addChild(), createSortingSQLStrings(), unserialize(), updateSubTreePath(), and updateURLAlias().

eZContentObjectTreeNode::createAttributeFilterSQLStrings ( &$  attributeFilter,
&$  sortingInfo 
)

static

Definition at line 955 of file ezcontentobjecttreenode.php.

Referenced by calendar(), subTree(), and subTreeMultiPaths().

eZContentObjectTreeNode::createClassFilteringSQLString ( classFilterType,
&$  classFilterArray 
)
eZContentObjectTreeNode::createExtendedAttributeFilterSQLStrings ( &$  extendedAttributeFilter  ) 

static

Definition at line 873 of file ezcontentobjecttreenode.php.

Referenced by calendar(), subTree(), subTreeCount(), and subTreeMultiPaths().

eZContentObjectTreeNode::createGroupBySQLStrings ( &$  outGroupBySelectText,
&$  outGroupByText,
groupBy 
)

static

Definition at line 1462 of file ezcontentobjecttreenode.php.

Referenced by calendar(), subTree(), and subTreeMultiPaths().

eZContentObjectTreeNode::createMainNodeConditionSQLString ( mainNodeOnly  ) 

static

Definition at line 915 of file ezcontentobjecttreenode.php.

Referenced by calendar(), subTree(), and subTreeMultiPaths().

eZContentObjectTreeNode::createNodesConditionSQLStringFromPath ( nodePath,
includingLastNodeInThePath,
limit = false 
)

static

Parameters:
$limit maximum number of nodes in the path to use, starting from last node

Definition at line 1675 of file ezcontentobjecttreenode.php.

Referenced by fetchNodesByPathString().

eZContentObjectTreeNode::createNotEqParentSQLString ( nodeID,
depth = false,
depthOperator = 'le' 
)

static

Definition at line 1280 of file ezcontentobjecttreenode.php.

Referenced by createPathConditionAndNotEqParentSQLStrings().

eZContentObjectTreeNode::createObject ( contentClassID,
parentNodeID = 2 
)
Deprecated:
This function should no longer be used, use the eZContentClass::instantiate and eZNodeAssignment::create instead.

Definition at line 3612 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::createObjectNameFilterConditionSQLString ( filter  ) 

static

Definition at line 930 of file ezcontentobjecttreenode.php.

Referenced by subTree(), subTreeCount(), and eZContentObjectTrashNode::trashList().

eZContentObjectTreeNode::createPathConditionAndNotEqParentSQLStrings ( &$  outPathConditionStr,
&$  outNotEqParentStr,
&$  treeNode,
nodeID,
depth = false,
depthOperator = 'le' 
)
eZContentObjectTreeNode::createPathConditionSQLString ( nodePath,
nodeDepth,
depth = false,
depthOperator = 'le' 
)

static

Definition at line 1294 of file ezcontentobjecttreenode.php.

Referenced by createPathConditionAndNotEqParentSQLStrings().

eZContentObjectTreeNode::createPermissionCheckingSQL ( &$  limitationList,
treeTableName = 'ezcontentobject_tree',
tableAliasName = 'ezcontentobject_tree' 
)
eZContentObjectTreeNode::createPermissionCheckingSQLString ( &$  limitationList  ) 

static Deprecated. Use 'createPermissionCheckingSQL' instead.

Definition at line 1545 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::createShowInvisibleSQLString ( useSettings,
fetchHidden = true 
)

static If $useSettings is true $fetchHidden will be ignored. If $useSettings is false $fetchHidden will be used.

Definition at line 1714 of file ezcontentobjecttreenode.php.

Referenced by calendar(), eZContentStructureTreeOperator::subTree(), subTree(), subTreeCount(), and subTreeMultiPaths().

eZContentObjectTreeNode::createSortingSQLStrings ( sortList,
treeTableName = 'ezcontentobject_tree' 
)
eZContentObjectTreeNode::createVersionNameJoinsSQLString ( useVersionName,
includeAnd = true,
onlyTranslated = false,
lang = false,
treeTableName = 'ezcontentobject_tree' 
)
eZContentObjectTreeNode::createVersionNameTablesSQLString ( useVersionName  ) 
eZContentObjectTreeNode::createVersionNameTargetsSQLString ( useVersionName  ) 
& eZContentObjectTreeNode::creator (  ) 
Returns:
the creator of the version published in the node.
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 5854 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::currentLanguage (  ) 

Definition at line 6206 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::dataMap (  ) 
Returns:
a map with all the content object attributes where the keys are the attribute identifiers.
See also:
eZContentObject::fetchDataMap

Definition at line 231 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::dataTypeByClassAttributeID ( classAttributeID  )  [static]

Definition at line 598 of file ezcontentobjecttreenode.php.

Referenced by createSortingSQLStrings().

eZContentObjectTreeNode::definition (  ) 
Returns:
the definition for the object, the default implementation is to return an empty array. It's upto each inheriting class to return a proper definition array.

The definition array is an associative array consists of these keys:

  • fields - an associative array of fields which defines which database field (the key) is to fetched and how they map to object member variables (the value).
  • keys - an array of fields which is used for uniquely identifying the object in the table.
  • function_attributes - an associative array of attributes which maps to member functions, used for fetching data with functions.
  • set_functions - an associative array of attributes which maps to member functions, used for setting data with functions.
  • increment_key - the field which is incremented on table inserts.
  • class_name - the classname which is used for instantiating new objecs when fetching from the database.
  • sort - an associative array which defines the default sorting of lists, the key is the table field while the value is the sorting method which is either asc or desc.
  • name - the name of the database table

Example:

function definition()
{
    return array( "fields" => array( "id" => "ID",
                                     "version" => "Version",
                                     "name" => "Name" ),
                  "keys" => array( "id", "version" ),
                  "function_attributes" => array( "current" => "currentVersion",
                                                  "class_name" => "className" ),
                  "increment_key" => "id",
                  "class_name" => "eZContentClass",
                  "sort" => array( "id" => "asc" ),
                  "name" => "ezcontentclass" );
}

Reimplemented from eZPersistentObject.

Reimplemented in eZContentObjectTrashNode.

Definition at line 80 of file ezcontentobjecttreenode.php.

Referenced by eZSSLZone::checkNodeID(), eZSSLZone::checkObject(), fetchByContentObjectID(), and eZHTTPHeader::headerOverrideArray().

eZContentObjectTreeNode::deleteNodeWhereParent ( node,
id 
)
Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 5497 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::eZContentObjectTreeNode ( row = array()  ) 

Constructor

Definition at line 75 of file ezcontentobjecttreenode.php.

Referenced by create(), fetchList(), and makeObjectsArray().

eZContentObjectTreeNode::fetch ( nodeID = false,
lang = false,
asObject = true,
conditions = false 
) [static]

Fetch node by $nodeID. If $nodeID is an array of ids then list of nodes will be returned.

Definition at line 3352 of file ezcontentobjecttreenode.php.

Referenced by eZContentObjectPackageHandler::add(), addChild(), eZPolicyLimitation::allValuesAsArrayWithNames(), assignSectionToSubTree(), eZContentUpload::checkAccess(), checkAccess(), classListFromPolicy(), eZSubtreeCache::cleanupByNodeIDs(), eZContentFunctions::createAndPublishObject(), eZObjectRelationListType::createNewObject(), createObject(), createPathConditionAndNotEqParentSQLStrings(), fetchByPath(), fetchByRemoteID(), fetchByURLPath(), eZWebDAVContentServer::fetchNodeByTranslation(), eZSubtreeNotificationRule::fetchNodesForUserID(), fetchParent(), eZWebDAVContentServer::fetchParentNodeByTranslation(), eZContentObjectPackageHandler::generateFetchAliasArray(), eZContentCacheManager::generateObjectViewCache(), eZContentObjectPackageHandler::generatePackage(), eZContentObjectPackageCreator::generatePackageInformation(), eZContentObjectPackageHandler::handleParameters(), eZContentStructureTreeOperator::initContentStructureTree(), eZObjectRelationListType::initializeObjectAttribute(), eZContentObjectPackageInstaller::initializeTopNodes(), eZTreeMenuOperator::modify(), eZContentObjectTreeNodeOperations::move(), move(), eZSubtreeNotificationRule::node(), eZContentUpload::nodeAliasID(), eZContentObjectAssignmentHandler::nodeID(), eZContentObjectTrashNode::originalParent(), eZSimplifiedXMLEditOutput::outputEmbed(), eZSimplifiedXMLEditOutput::outputLink(), pathWithNames(), eZXMLTextType::postUnserializeContentObjectAttribute(), eZXMLOutputHandler::prefetch(), eZSimplifiedXMLInputParser::publishHandlerEmbed(), eZSimplifiedXMLInputParser::publishHandlerLink(), remove(), removeSubtrees(), reverseRelatedCount(), eZXMLTextType::serializeContentObjectAttribute(), eZContentObjectAssignmentHandler::setupAssignments(), updateMainNodeID(), and viewCount().

eZContentObjectTreeNode::fetchAliasesFromNodeList ( nodeList  ) 
eZContentObjectTreeNode::fetchByContentObjectID ( contentObjectID,
asObject = true,
contentObjectVersion = false 
)
& eZContentObjectTreeNode::fetchByCRC ( pathStr  ) 

Definition at line 3214 of file ezcontentobjecttreenode.php.

Referenced by eZURLTranslator::translateNodeTree().

eZContentObjectTreeNode::fetchByPath ( pathString,
asObject = true 
)
eZContentObjectTreeNode::fetchByRemoteID ( remoteID,
asObject = true 
)
eZContentObjectTreeNode::fetchByURLPath ( pathString,
asObject = true 
)
& eZContentObjectTreeNode::fetchClassIdentifierListByPathString ( nodePath,
withLastNode,
limit = false 
) [static]

Extracts each node that in the path from db and returns an array of class identifiers

Parameters:
$nodePath A string containing the path of the node, it consists of node IDs starting from the root and delimited by / (slash).
$withLastNode If true the last node in the path is included in the list. The last node is the node which the path was fetched from.
$limit maximum number of nodes in the path to use, starting from last node
Returns:
An array with class identifier and node ID.

Example

     $list = fetchClassIdentifierListByPathString( '/2/10/', false );

Definition at line 3594 of file ezcontentobjecttreenode.php.

Referenced by eZContentCacheManager::nodeListForObject().

eZContentObjectTreeNode::fetchList ( asObject = true,
offset = false,
limit = false 
)

Fetches a list of nodes and returns it. Offset and limitation can be set if needed.

Definition at line 619 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::fetchListCount (  ) 

Fetches the number of nodes which exists in the system.

Definition at line 608 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::fetchNode ( contentObjectID,
parentNodeID 
) [static]

Finds the node for the object $contentObjectID which placed as child of node $parentNodeID.

Returns:
An eZContentObjectTreeNode object or null if no node was found.

Definition at line 3469 of file ezcontentobjecttreenode.php.

Referenced by eZContentObjectTreeNodeOperations::move(), eZLDAPUser::publishUpdateUser(), and eZContentObject::unserialize().

eZContentObjectTreeNode::fetchNodesByPathString ( nodePath,
withLastNode = false,
asObjects = true,
limit = false 
) [static]
Returns:
An array with content node objects that is present in the node path $nodePath.
Parameters:
$withLastNode If true the last node in the path is included in the list. The last node is the node which the path was fetched from.
$asObjects If true then return PHP objects, if not return raw row data.
$limit maximum number of nodes in the path to use, starting from last node

Definition at line 3538 of file ezcontentobjecttreenode.php.

Referenced by fetchClassIdentifierListByPathString(), and fetchPath().

& eZContentObjectTreeNode::fetchParent (  ) 
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 3497 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::fetchPath (  ) 

Definition at line 3521 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::findMainNode ( objectID,
asObject = false 
)
& eZContentObjectTreeNode::findMainNodeArray ( objectIDArray,
asObject = true 
)

Fetches the main nodes for an array of object id's

Definition at line 3312 of file ezcontentobjecttreenode.php.

Referenced by eZKeyword::relatedObjects().

eZContentObjectTreeNode::findNode ( parentNode,
id,
asObject = false,
remoteID = false 
)

Definition at line 5503 of file ezcontentobjecttreenode.php.

Referenced by deleteNodeWhereParent().

eZContentObjectTreeNode::getClassesJsArray ( node = false,
includeFilter = true,
groupList = false,
fetchID = false,
classes = false 
)

Definition at line 6344 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::getLimitationList ( &$  limitation  ) 
& eZContentObjectTreeNode::getName ( language = false  ) 

Definition at line 5568 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::getParentNodeId ( nodeID  ) 

Definition at line 5478 of file ezcontentobjecttreenode.php.

Referenced by eZContentObject::mainParentNodeID().

eZContentObjectTreeNode::hasContentObject (  ) 

Definition at line 5833 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::hiddenInvisibleString (  ) 
Returns:
combined string representation of both "is_hidden" and "is_invisible" attributes Used in the node view templates. FIXME: this method probably should be removed in the future.

Definition at line 5974 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::hiddenStatusString (  ) 
Returns:
combined string representation of both "is_hidden" and "is_invisible" attributes Used in the limitation handling templates.

Definition at line 5984 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::hideSubTree ( &$  node,
modifyRootNode = true 
)

static

Parameters:
$node Root node of the subtree
$modifyRootNode Whether to modify the root node (true/false)

Hide algorithm: if ( root node of the subtree is visible ) { 1) Mark root node as hidden and invisible 2) Recursively mark child nodes as invisible except for ones which have been previously marked as invisible } else { Mark root node as hidden }

In some cases we don't want to touch the root node when (un)hiding a subtree, for example after content/move or content/copy. That's why $modifyRootNode argument is used.

Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 6020 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::isMain (  ) 
Returns:
true if this node is the main node.

Definition at line 257 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::makeObjectsArray ( &$  array,
with_contentobject = true 
)
eZContentObjectTreeNode::move ( newParentNodeID,
nodeID = 0 
)

Moves the node to the given node.

Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

role system clean up

Definition at line 4558 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::object (  ) 

Definition at line 5820 of file ezcontentobjecttreenode.php.

Referenced by dataMap(), and removeNodeFromTree().

eZContentObjectTreeNode::parentDepthLimitationList (  )  [static]

Definition at line 6224 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::pathArray (  ) 
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 3507 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::pathWithNames ( nodeID = 0  ) 
Returns:
an url alias for the current node. It will generate a unique alias.

Definition at line 3710 of file ezcontentobjecttreenode.php.

Referenced by updateSubTreePath(), and updateURLAlias().

& eZContentObjectTreeNode::remoteID (  ) 

Get remote id of content node, the remote ID is often used to synchronise imports and exports. If there is no remote ID a new unique one will be generated.

Definition at line 241 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::remove ( nodeID = 0  ) 

Removes the current node.

Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 4032 of file ezcontentobjecttreenode.php.

Referenced by deleteNodeWhereParent().

eZContentObjectTreeNode::removeNodeFromTree ( moveToTrash = true  ) 

Will check if you are removing the main node in which case it relocates the main node before removing it. It will also remove the object if there no more node assignments for it.

Parameters:
$moveToTrash If true it will move the object to trash, if false the object will be purged from the system.
Note:
This uses remove() to do the actual node removal but has some extra logic
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 4417 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::removeSubtrees ( deleteIDArray,
moveToTrash = true,
infoOnly = false 
) [static]

Will remove the nodes in the subtrees defined in $deleteIDArray, it will only remove the nodes unless there are no more nodes for an object in which case the object is removed too.

Parameters:
$moveToTrash If true it will move the object to trash, if false the object will be purged from the system.
$infoOnly If set to true then it will not remove the subtree but instead return information on what will happen if it is removed. See subtreeRemovalInformation() for the returned structure.
Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 4187 of file ezcontentobjecttreenode.php.

Referenced by eZContentObjectOperations::remove(), subtreeRemovalInformation(), and eZContentObjectPackageHandler::uninstall().

eZContentObjectTreeNode::reverseRelatedCount ( nodeIDArray  )  [static, private]

Return reverse related count for specified node

Parameters:
$nodeIDArray,array of node id's
Returns:
reverse related count.

Definition at line 4368 of file ezcontentobjecttreenode.php.

Referenced by removeSubtrees().

eZContentObjectTreeNode::serialize ( options,
contentNodeIDArray,
topNodeIDArray 
)

Serialize ContentObjectTreeNode

$options contentNodeIDArray topNodeIDArray

Definition at line 5750 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::setContentObject ( object  ) 

Sets the current content object for this node.

Definition at line 5844 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::setCurrentLanguage ( languageCode  ) 

Definition at line 6211 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::setName ( name  ) 

Definition at line 5603 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::setVersionByObjectID ( objectID,
newVersion 
)

Definition at line 6200 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::showInvisibleNodes (  ) 

static

Returns:
true if we should show invisible nodes (determined by ini setting), false otherwise.

Definition at line 1732 of file ezcontentobjecttreenode.php.

Referenced by createShowInvisibleSQLString().

& eZContentObjectTreeNode::sortArray (  ) 
Returns:
an array which defines the sorting method for this node. The array will contain one element which is an array with sort field and sort order.

Definition at line 3069 of file ezcontentobjecttreenode.php.

Referenced by children().

eZContentObjectTreeNode::sortArrayBySortFieldAndSortOrder ( sortField,
sortOrder 
) [static]
Returns:
an array which defines the sorting method for this node. The array will contain one element which is an array with sort field and sort order.

Definition at line 3082 of file ezcontentobjecttreenode.php.

Referenced by eZContentStructureTreeOperator::createContentStructureNode(), and sortArray().

eZContentObjectTreeNode::sortFieldID ( sortFieldName  ) 
Returns:
the field name for the sort order number $sortOrder. Gives a warning if the number is unknown and return 'path'.

Definition at line 3035 of file ezcontentobjecttreenode.php.

Referenced by unserialize().

eZContentObjectTreeNode::sortFieldName ( sortOrder  ) 
Returns:
the field name for the sort order number $sortOrder. Gives a warning if the number is unknown and return 'path'.

Definition at line 3002 of file ezcontentobjecttreenode.php.

Referenced by serialize(), and sortArrayBySortFieldAndSortOrder().

eZContentObjectTreeNode::sortKeyByClassAttributeID ( classAttributeID  )  [static]
Returns:
the sort key for the given classAttributeID. int|string is returend. False is returned if unsuccessful.

Definition at line 589 of file ezcontentobjecttreenode.php.

Referenced by createAttributeFilterSQLStrings(), createSortingSQLStrings(), and subTreeCount().

eZContentObjectTreeNode::store (  ) 
Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 5810 of file ezcontentobjecttreenode.php.

Referenced by eZContentObjectTrashNode::storeToTrash(), updateSubTreePath(), and updateURLAlias().

& eZContentObjectTreeNode::subTree ( params = false,
nodeID = 0 
)
& eZContentObjectTreeNode::subTreeCount ( params = array(),
nodeID = 0 
)

Count number of subnodes

Parameters:
params array

Definition at line 2232 of file ezcontentobjecttreenode.php.

Referenced by childrenCount(), and updateSubTreePath().

eZContentObjectTreeNode::subTreeGroupByDateField ( field,
type 
)

Definition at line 2184 of file ezcontentobjecttreenode.php.

Referenced by createGroupBySQLStrings().

eZContentObjectTreeNode::subTreeMultiPaths ( nodesParams,
listParams = NULL 
)

Retrieve subtrees from multiple paths.

This method composes a list of objects retrieved from various node paths, sorted by criteria that are globally applied to the whole list.

It is for example useful for an RSS feed that serves content from several node paths. The respective subtrees need to be amalgated and the resulting object listed sorted by publishing date to show the latest entries in chronological order.

The first parameter is a multi-dimensional array containing the node IDs and filter criteria assigned to each of the nodes:

array( [node_1] => array( 'ClassFilterType' => [filter_type], 'ClassFilterArray' => [filter_array] ), [node_2] => array( 'ClassFilterType' => [filter_type], 'ClassFilterArray' => [filter_array] ) )

The second parameter is a single-dimensional array with criteria applied to the list of objects retrieved from the various subtrees:

array( 'SortBy' => [sorting-criteria] )

Definition at line 1996 of file ezcontentobjecttreenode.php.

Referenced by eZRSSExportItem::fetchNodeList().

eZContentObjectTreeNode::subtreeRemovalInformation ( deleteIDArray  )  [static]

Returns information on what will happen if all subtrees in $deleteIDArray is removed. The returned structure is:

  • move_to_trash - true if removed objects can be moved to trash, some objects are not allowed to be in trash (e.g user).
  • total_child_count - The total number of children for all delete items
  • can_remove_all - Will be set to true if all selected items can be removed, false otherwise
  • delete_list - A list of all subtrees that should be removed, structure: -- node - The content node -- object - The content object -- class - The content class -- node_name - The name of the node -- child_count - Total number of child items below the node -- can_remove - Boolean which tells if the user has permission to remove the node -- can_remove_subtree - Boolean which tells if the user has permission to remove items in the subtree -- new_main_node_id - The new main node ID for the node if it needs to be moved, or false if not -- object_node_count - The number of nodes the object has (before removal) -- sole_node_count - The number of nodes in the subtree (excluding current) that does not have multiple locations.
Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 4166 of file ezcontentobjecttreenode.php.

Referenced by eZContentObjectPackageHandler::uninstall().

eZContentObjectTreeNode::subtreeSoleNodeCount ( params = array()  ) 
Returns:
The number of nodes in the current subtree that have no other placements.

Definition at line 4486 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::unhideSubTree ( &$  node,
modifyRootNode = true 
)

static

Parameters:
$node Root node of the subtree
$modifyRootNode Whether to modify the root node (true/false)

Unhide algorithm: if ( parent node is visible ) { 1) Mark root node as not hidden and visible. 2) Recursively mark child nodes as visible (except for nodes previosly marked as hidden, and all their children). } else { Mark root node as not hidden. }

Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 6069 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::unserialize ( contentNodeDOMNode,
contentObject,
version,
isMain,
&$  nodeList,
&$  options,
handlerType = 'ezcontentobject' 
) [static]

Creates propper nodeassigment from contentNodeDOMNode specification

Parameters:
contentobjecttreenode DOMNode
contentobject. 
version 
isMain 
options 
Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 5621 of file ezcontentobjecttreenode.php.

Referenced by checkAccess().

eZContentObjectTreeNode::updateAndStoreModified (  ) 

Update and store modified_subnode value for this node and all super nodes.

Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 5787 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::updateMainNodeID ( mainNodeID,
objectID,
version = false,
parentMainNodeID 
) [static]

Updates the main node selection for the content object $objectID.

Parameters:
$mainNodeID The ID of the node that should be that main node
$objectID The ID of the object that all nodes belong to
$version The version of the object to update node assignments, use false for currently published version.
$parentMainNodeID The ID of the parent node of the new main placement
Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 3184 of file ezcontentobjecttreenode.php.

Referenced by eZContentObjectPackageHandler::installSuspendedNodeAssignment(), eZLDAPUser::publishUpdateUser(), removeNodeFromTree(), and eZContentObject::unserialize().

eZContentObjectTreeNode::updateNodeVisibility ( &$  node,
&$  parentNode,
recursive = true 
)

static Depending on the new parent node visibility, recompute "is_invisible" attribute for the given node and its children. (used after content/move or content/copy)

Definition at line 6113 of file ezcontentobjecttreenode.php.

Referenced by move().

eZContentObjectTreeNode::updateSubTreePath (  ) 
Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 3933 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::updateURLAlias (  ) 
Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 3868 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::url (  ) 

Definition at line 5913 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::urlAlias (  ) 

Definition at line 5877 of file ezcontentobjecttreenode.php.

& eZContentObjectTreeNode::viewCount (  ) 

Get amount views of content node.

Definition at line 2990 of file ezcontentobjecttreenode.php.


Member Data Documentation

eZContentObjectTreeNode::$ClassIdentifier = null

Contains the cached value of the class identifier.

Definition at line 6392 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::$ClassName = null

Definition at line 6393 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::$CurrentLanguage = false

The current language for the node.

Definition at line 6386 of file ezcontentobjecttreenode.php.

eZContentObjectTreeNode::$Name

Name of the node.

Definition at line 6389 of file ezcontentobjecttreenode.php.


The documentation for this class was generated from the following file:
Generated on Mon Jul 12 07:10:15 2010 for eZ publish by  doxygen 1.6.3