eZPublish  3.8
eZContentObjectTreeNode Class Reference

The class eZContentObjectTreeNode does. More...

+ Inheritance diagram for eZContentObjectTreeNode:
+ Collaboration diagram for eZContentObjectTreeNode:

Public Member Functions

addChild ($contentobjectID, $nodeID=0, $asObject=false, $contentObjectVersion=false)
 
 assignSectionToSubTree ($nodeID, $sectionID, $oldSectionID=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)
 
 createNotEqParentSQLString ($nodeID, $depth, $depthOperator)
 
 createObject ($contentClassID, $parentNodeID=2)
 
 createPathConditionAndNotEqParentSQLStrings (&$outPathConditionStr, &$outNotEqParentStr, &$treeNode, $nodeID, $depth, $depthOperator)
 
 createPathConditionSQLString ($nodePath, $nodeDepth, $depth, $depthOperator)
 
 createPermissionCheckingSQLString (&$limitationList)
 
 createShowInvisibleSQLString ($useSettings, $fetchHidden=true)
 
 createSortingSQLStrings ($sortList)
 
 createVersionNameJoinsSQLString ($useVersionName, $includeAnd=true, $onlyTranslated=false, $lang=false)
 
 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)
 
 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 ()
 
- Public Member Functions inherited from eZPersistentObject
attribute ($attr, $noFunction=false)
 
 attributes ()
 
 conditionText (&$conditions)
 
conditionTextByRow (&$conditions, &$row)
 
 definition ()
 
escapeArray (&$array)
 
 eZPersistentObject ($row)
 
 fetchObject (&$def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
 
 fetchObjectList (&$def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null)
 
 fill (&$row)
 
 getShortAttributeName (&$db, &$def, $attrName)
 
 handleRows (&$rows, $class_name, $asObject)
 
 hasAttribute ($attr)
 
 hasDirtyData ()
 
 newObjectOrder (&$def, $orderField, $conditions)
 
 remove ($conditions=null, $extraConditions=null)
 
 removeObject (&$def, $conditions=null, $extraConditions=null)
 
 reorderObject (&$def, $orderField, $conditions, $down=true)
 
 setAttribute ($attr, $val)
 
 setHasDirtyData ($hasDirtyData)
 
 store ($fieldFilters=null)
 
 swapRow ($table, &$keys, &$order_id, &$rows, $id1, $id2)
 
 sync ($fieldFilters=null)
 
 updateObjectList ($parameters)
 

Static Public Member Functions

 dataTypeByClassAttributeID ($classAttributeID)
 
 fetch ($nodeID=false, $lang=false, $asObject=true, $conditions=false)
 
fetchClassIdentifierListByPathString ($nodePath, $withLastNode)
 
 fetchNode ($contentObjectID, $parentNodeID)
 
 fetchNodesByPathString ($nodePath, $withLastNode=false, $asObjects=true)
 
 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. More...
 
 $ClassName = null
 
 $CurrentLanguage = false
 The current language for the node. More...
 
 $Name
 Name of the node. More...
 

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

Member Function Documentation

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

Add a child to the object tree.

Parameters
$contentobjectIDThe ID of the contentobject the child-node should point to.
$nodeIDThe ID of the parent-node to add child-node to, if 0 it uses $this.
$asObjectIf true it will return the new child-node as an object, if not it returns the ID.
$contentObjectVersionThe 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.

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.

Referenced by eZContentObjectTreeNodeOperations\move(), updateMainNodeID(), and eZContentOperationCollection\updateSectionID().

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

Referenced by eZContentFunctionCollection\calendar().

& eZContentObjectTreeNode::canAddLocation ( )
Returns
true if current user can add object locations to current node.
See Also
checkAccess()
& 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.
& 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
$asObjectIf true then it return eZContentClass objects, if not it will be an associative array with name and id keys.
$includeFilterIf true then it will include only from class groups defined in $groupList, if not it will exclude those groups.
$groupListAn array with class group IDs that should be used in filtering, use false if you do not wish to filter at all.
$idA unique name for the current fetch, this must be supplied when filtering is used if you want caching to work.
& 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.
& 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.
& 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.
& 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.

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.
& 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.
& 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.
& 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.
& eZContentObjectTreeNode::canRemoveLocation ( )
Returns
true if current user can add object locations to current node.
& 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.
& 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.
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.

& eZContentObjectTreeNode::children ( )

Returns the first level children in sorted order.

& eZContentObjectTreeNode::childrenByName (   $name)
Returns
the children(s) of the current node as an array of eZContentObjectTreeNode objects
& 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.

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.

Referenced by createAttributeFilterSQLStrings(), createSortingSQLStrings(), eZContentFunctionCollection\fetchRelatedObjects(), eZContentFunctionCollection\fetchRelatedObjectsCount(), eZContentFunctionCollection\fetchReverseRelatedObjects(), eZContentFunctionCollection\fetchReverseRelatedObjectsCount(), 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.

Referenced by createClassFilteringSQLString(), and subTreeCount().

& eZContentObjectTreeNode::classIdentifier ( )
Returns
the cached value of the class identifier if it exists, it not it's fetched dynamically
eZContentObjectTreeNode::classListFromPolicy (   $policy,
  $allowedLanguageCodes = false 
)

Referenced by canCreateClassList().

& eZContentObjectTreeNode::className ( )
Returns
the cached value of the class name if it exists, it not it's fetched dynamically
eZContentObjectTreeNode::clearViewCacheForSubtree ( $node,
  $clearForRootNode = true 
)

static

Returns
true on success, false otherwise
& eZContentObjectTreeNode::contentObjectVersionObject (   $asObject = true)
eZContentObjectTreeNode::create (   $parentNodeID = null,
  $contentObjectID = null,
  $contentObjectVersion = 0,
  $sortField = 0,
  $sortOrder = true 
)

Creates a new tree node and returns it.

Parameters
$parentNodeIDThe ID of the parent or null if the node is not known yet.
$contentObjectIDThe ID of the object it points to or null if it is not known yet.
$contentObjectVersionThe version of the object or 0 if not known yet.
$sortFieldNumber describing the field to sort by, or 0 if not known yet.
$sortOrderWhich way to sort, true means ascending while false is descending.
Note
The attribute remote_id will get an automatic and unique value.

Referenced by addChild(), eZContentObjectVersion\tempMainNode(), and eZNodeAssignment\tempNode().

eZContentObjectTreeNode::createAttributeFilterSQLStrings ( $attributeFilter,
$sortingInfo 
)

static

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

eZContentObjectTreeNode::createClassFilteringSQLString (   $classFilterType,
$classFilterArray 
)
eZContentObjectTreeNode::createExtendedAttributeFilterSQLStrings ( $extendedAttributeFilter)
eZContentObjectTreeNode::createGroupBySQLStrings ( $outGroupBySelectText,
$outGroupByText,
  $groupBy 
)

static

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

eZContentObjectTreeNode::createMainNodeConditionSQLString (   $mainNodeOnly)

static

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

eZContentObjectTreeNode::createNodesConditionSQLStringFromPath (   $nodePath,
  $includingLastNodeInThePath 
)

static

Referenced by fetchNodesByPathString().

eZContentObjectTreeNode::createNotEqParentSQLString (   $nodeID,
  $depth,
  $depthOperator 
)
eZContentObjectTreeNode::createObject (   $contentClassID,
  $parentNodeID = 2 
)
Deprecated:
This function should no longer be used, use the eZContentClass::instantiate and eZNodeAssignment::create instead.
eZContentObjectTreeNode::createPathConditionAndNotEqParentSQLStrings ( $outPathConditionStr,
$outNotEqParentStr,
$treeNode,
  $nodeID,
  $depth,
  $depthOperator 
)

static

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

eZContentObjectTreeNode::createPathConditionSQLString (   $nodePath,
  $nodeDepth,
  $depth,
  $depthOperator 
)
eZContentObjectTreeNode::createShowInvisibleSQLString (   $useSettings,
  $fetchHidden = true 
)

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

Referenced by calendar(), eZContentFunctionCollection\fetchKeyword(), eZContentFunctionCollection\fetchKeywordCount(), eZSearchEngine\search(), eZContentStructureTreeOperator\subTree(), subTree(), subTreeCount(), and subTreeMultiPaths().

eZContentObjectTreeNode::createSortingSQLStrings (   $sortList)
eZContentObjectTreeNode::createVersionNameJoinsSQLString (   $useVersionName,
  $includeAnd = true,
  $onlyTranslated = false,
  $lang = false 
)
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.
eZContentObjectTreeNode::currentLanguage ( )
& eZContentObjectTreeNode::dataMap ( )
Returns
a map with all the content object attributes where the keys are the attribute identifiers.
See Also
eZContentObject::fetchDataMap
eZContentObjectTreeNode::dataTypeByClassAttributeID (   $classAttributeID)
static

Referenced by createSortingSQLStrings().

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.
eZContentObjectTreeNode::eZContentObjectTreeNode (   $row = array())

Constructor

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.

Referenced by eZContentObjectPackageHandler\add(), addChild(), eZPolicyLimitation\allValuesAsArrayWithNames(), assignSectionToSubTree(), eZContentObjectVersion\checkAccess(), eZContentObject\checkAccess(), checkAccess(), checkNodeAssignments(), checkNodeMovements(), eZContentObject\classListFromPolicy(), classListFromPolicy(), eZSubtreeCache\cleanupByNodeIDs(), copyObject(), copyPublishContentObject(), copySubtree(), createObject(), createPathConditionAndNotEqParentSQLStrings(), eZRSSImport\destinationPath(), eZShopFunctionCollection\fetchBestSellList(), fetchByPath(), fetchByRemoteID(), fetchByURLPath(), eZContentFunctionCollection\fetchContentNode(), eZContentFunctionCollection\fetchKeyword(), eZContentFunctionCollection\fetchMostViewedTopList(), eZContentBrowseBookmark\fetchNode(), eZContentBrowseRecent\fetchNode(), eZWebDAVContentServer\fetchNodeByTranslation(), eZSubtreeNotificationRule\fetchNodesForUserID(), eZCollaborationFunctionCollection\fetchObjectTreeCount(), fetchParent(), eZWebDAVContentServer\fetchParentNodeByTranslation(), eZContentFunctionCollection\fetchSameClassAttributeNodeList(), eZContentFunctionCollection\fetchTipafriendTopList(), eZContentObjectPackageHandler\generateFetchAliasArray(), eZContentCacheManager\generateObjectViewCache(), eZContentObjectPackageHandler\generatePackage(), eZContentObjectPackageCreator\generatePackageInformation(), eZRSSExportItem\getAttributeMappings(), eZNodeAssignment\getParentNode(), eZContentUpload\handleLocalFile(), eZContentObjectPackageHandler\handleParameters(), eZContentUpload\handleUpload(), eZRSSExport\imageNode(), eZRSSExport\imagePath(), importRSSItem(), eZContentStructureTreeOperator\initContentStructureTree(), eZObjectRelationListType\initializeObjectAttribute(), eZContentObjectPackageInstaller\initializeTopNodes(), eZLDAPUser\loginUser(), eZTreeMenuOperator\modify(), eZContentObjectTreeNodeOperations\move(), move(), eZSubtreeNotificationRule\node(), eZWorkflowProcess\node(), eZContentUpload\nodeAliasID(), eZContentObjectAssignmentHandler\nodeID(), eZContentCacheManager\nodeListForObject(), eZSimplifiedXMLEditOutput\outputEmbed(), eZSimplifiedXMLEditOutput\outputLink(), pathWithNames(), eZPDFXMLOutput\pdf(), eZXMLTextType\postUnserializeContentObjectAttribute(), eZSimplifiedXMLInputParser\publishHandlerEmbed(), eZSimplifiedXMLInputParser\publishHandlerLink(), eZContentOperationCollection\publishNode(), eZContentOperationCollection\readObject(), eZContentObject\remove(), remove(), removeSubtrees(), reverseRelatedCount(), eZXMLTextType\serializeContentObjectAttribute(), eZContentObjectAssignmentHandler\setupAssignments(), eZRSSExportItem\sourceNode(), eZPDFExport\sourceNode(), eZRSSExportItem\sourcePath(), subTreeCount(), and eZXHTMLXMLOutput\xhtml().

eZContentObjectTreeNode::fetchAliasesFromNodeList (   $nodeList)
eZContentObjectTreeNode::fetchByContentObjectID (   $contentObjectID,
  $asObject = true,
  $contentObjectVersion = false 
)
& eZContentObjectTreeNode::fetchByCRC (   $pathStr)
eZContentObjectTreeNode::fetchByPath (   $pathString,
  $asObject = true 
)
& eZContentObjectTreeNode::fetchClassIdentifierListByPathString (   $nodePath,
  $withLastNode 
)
static

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

Parameters
$nodePathA string containing the path of the node, it consists of node IDs starting from the root and delimited by / (slash).
$withLastNodeIf true the last node in the path is included in the list. The last node is the node which the path was fetched from.
Returns
An array with class identifier and node ID.

Example

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.

eZContentObjectTreeNode::fetchListCount ( )

Fetches the number of nodes which exists in the system.

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.

Referenced by checkNodeActions(), checkNodeMovements(), eZNodeAssignment\fetchNode(), eZLDAPUser\loginUser(), eZContentObjectTreeNodeOperations\move(), eZContentOperationCollection\publishNode(), and eZContentObject\unserialize().

eZContentObjectTreeNode::fetchNodesByPathString (   $nodePath,
  $withLastNode = false,
  $asObjects = true 
)
static
Returns
An array with content node objects that is present in the node path $nodePath.
Parameters
$withLastNodeIf true the last node in the path is included in the list. The last node is the node which the path was fetched from.
$asObjectsIf true then return PHP objects, if not return raw row data.

Referenced by fetchClassIdentifierListByPathString(), and fetchPath().

& eZContentObjectTreeNode::fetchParent ( )
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentObjectTreeNode::fetchPath ( )
& eZContentObjectTreeNode::findMainNode (   $objectID,
  $asObject = false 
)
& eZContentObjectTreeNode::findMainNodeArray (   $objectIDArray,
  $asObject = true 
)

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

Referenced by eZKeyword\relatedObjects().

eZContentObjectTreeNode::findNode (   $parentNode,
  $id,
  $asObject = false,
  $remoteID = false 
)
& eZContentObjectTreeNode::getName (   $language = false)
eZContentObjectTreeNode::getParentNodeId (   $nodeID)
eZContentObjectTreeNode::hasContentObject ( )
& 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.
& eZContentObjectTreeNode::hiddenStatusString ( )
Returns
combined string representation of both "is_hidden" and "is_invisible" attributes Used in the limitation handling templates.
eZContentObjectTreeNode::hideSubTree ( $node,
  $modifyRootNode = true 
)

static

Parameters
$nodeRoot node of the subtree
$modifyRootNodeWhether 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.
& eZContentObjectTreeNode::isMain ( )
Returns
true if this node is the main node.
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

& eZContentObjectTreeNode::object ( )

Referenced by dataMap(), and removeNodeFromTree().

eZContentObjectTreeNode::parentDepthLimitationList ( )
static
& eZContentObjectTreeNode::pathArray ( )
Note
The reference for the return value is required to workaround a bug with PHP references.
eZContentObjectTreeNode::pathWithNames (   $nodeID = 0)
Returns
an url alias for the current node. It will generate a unique alias.

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.

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.

Referenced by deleteNodeWhereParent(), and eZContentObject\remove().

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
$moveToTrashIf 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.
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
$moveToTrashIf true it will move the object to trash, if false the object will be purged from the system.
$infoOnlyIf 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.

Referenced by eZContentObjectOperations\remove(), eZContentOperationCollection\removeOldNodes(), subtreeRemovalInformation(), and eZContentObjectPackageHandler\uninstall().

eZContentObjectTreeNode::reverseRelatedCount (   $nodeIDArray)
staticprivate

Return reverse related count for specified node

Parameters
$nodeIDList,arrayof node id's
Returns
reverse related count.

Referenced by removeSubtrees().

eZContentObjectTreeNode::serialize (   $options,
  $contentNodeIDArray,
  $topNodeIDArray 
)

Serialize ContentObjectTreeNode

$options contentNodeIDArray topNodeIDArray

eZContentObjectTreeNode::setContentObject (   $object)

Sets the current content object for this node.

eZContentObjectTreeNode::setCurrentLanguage (   $languageCode)
eZContentObjectTreeNode::setName (   $name)
eZContentObjectTreeNode::setVersionByObjectID (   $objectID,
  $newVersion 
)
eZContentObjectTreeNode::showInvisibleNodes ( )

static

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

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.

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.

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'.

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'.

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.

Referenced by eZSearchEngine\buildSortSQL(), 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.

Referenced by updateSubTreePath(), and updateURLAlias().

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

Count number of subnodes

Parameters
paramsarray

Referenced by childrenCount(), eZContentFunctionCollection\fetchObjectTreeCount(), and updateSubTreePath().

eZContentObjectTreeNode::subTreeGroupByDateField (   $field,
  $type 
)

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] )

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.

Referenced by eZContentObjectPackageHandler\uninstall().

eZContentObjectTreeNode::subtreeSoleNodeCount (   $params = array())
Returns
The number of nodes in the current subtree that have no other placements.
eZContentObjectTreeNode::unhideSubTree ( $node,
  $modifyRootNode = true 
)

static

Parameters
$nodeRoot node of the subtree
$modifyRootNodeWhether 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.
eZContentObjectTreeNode::unserialize (   $contentNodeDOMNode,
  $contentObject,
  $version,
  $isMain,
$nodeList,
$options,
  $handlerType = 'ezcontentobject' 
)
static

Creates propper nodeassigment from contentNodeDOMNode specification

Parameters
contentobjecttreenodeDOMNode
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.

Referenced by checkAccess(), and eZContentObjectVersion\unserialize().

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.
eZContentObjectTreeNode::updateMainNodeID (   $mainNodeID,
  $objectID,
  $version = false,
  $parentMainNodeID 
)
static

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

Parameters
$mainNodeIDThe ID of the node that should be that main node
$objectIDThe ID of the object that all nodes belong to
$versionThe version of the object to update node assignments, use false for currently published version.
$parentMainNodeIDThe 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.

Referenced by eZContentObjectPackageHandler\installSuspendedNodeAssignment(), eZLDAPUser\loginUser(), 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)

Referenced by copyObject(), copyPublishContentObject(), and 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.
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.
& eZContentObjectTreeNode::url ( )
& eZContentObjectTreeNode::urlAlias ( )
& eZContentObjectTreeNode::viewCount ( )

Get amount views of content node.

Member Data Documentation

eZContentObjectTreeNode::$ClassIdentifier = null

Contains the cached value of the class identifier.

eZContentObjectTreeNode::$ClassName = null
eZContentObjectTreeNode::$CurrentLanguage = false

The current language for the node.

Referenced by getName().

eZContentObjectTreeNode::$Name

Name of the node.

Referenced by getName().


The documentation for this class was generated from the following file: