eZPublishCommunityProject(LegacyStack)  2013.9
eZContentObjectTreeNode Class Reference
+ Inheritance diagram for eZContentObjectTreeNode:
+ Collaboration diagram for eZContentObjectTreeNode:

Public Member Functions

 addChild ($contentobjectID, $asObject=false, $contentObjectVersion=false)
 
 adjustPathElement ($element, $useParentFromNodeObject=false)
 
 availableClassesJsArray ()
 Returns available classes as Js array. More...
 
 canAddLocation ()
 Returns true if current user can add object locations to current node. More...
 
 canCreate ()
 Returns true if the current user can create a new node as child of this node. More...
 
 canCreateClassList ($asObject=false, $includeFilter=true, $groupList=false, $fetchID=false)
 
 canEdit ()
 Returns true if the node can be edited by the current user. More...
 
 canHide ()
 Returns true if the node can be hidden by the current user. More...
 
 canMoveFrom ()
 Returns true if the node can be moved by the current user. More...
 
 canMoveTo ($classID=false)
 Returns true if a node of class $classID can be moved to the current node by the current user. More...
 
 canPdf ()
 Returns true if the current user can create a pdf of this content object. More...
 
 canRead ()
 Returns true if the node can be read by the current user. More...
 
 canRemove ()
 Returns true if the node can be removed by the current user. More...
 
 canRemoveLocation ()
 Returns true if current user can add object locations to current node. More...
 
 canSwap ()
 Returns true if a node can be swaped by the current user. More...
 
 canViewEmbed ()
 Returns true if the node can be viewed as embeded object by the current user. More...
 
 checkAccess ($functionName, $originalClassID=false, $parentClassID=false, $returnAccessList=false, $language=false)
 
 checkPath ($path)
 
 children ()
 Returns the first level children in sorted order. More...
 
 childrenByName ($name)
 
 childrenCount ($checkPolicies=true)
 
 classIdentifier ()
 Returns the node's class identifier. More...
 
 classIsContainer ()
 Returns 1 if the node's class is a container class, 0 otherwise. More...
 
 classListFromPolicy ($policy, $allowedLanguageCodes=false)
 
 className ()
 Returns the node's class name. More...
 
 contentObjectVersionObject ($asObject=true)
 Returns the eZContentObjectVersionObject of the current node. More...
 
 creator ()
 Returns the creator of the version published in the node. More...
 
 currentLanguage ()
 Returns the node's current language. More...
 
 dataMap ()
 Returns an array with all the content object attributes where the keys are the attribute identifiers. More...
 
 eZContentObjectTreeNode ($row=array())
 Initializes the object with the $row. More...
 
 fetchByCRC ($pathStr)
 
 fetchParent ()
 
 fetchPath ()
 
 getName ($language=false)
 
 hasContentObject ()
 Checks if the node's contentobject has already loaded. More...
 
 hiddenInvisibleString ()
 Returns combined string representation of both "is_hidden" and "is_invisible" attributes. More...
 
 hiddenStatusString ()
 Returns combined string representation of both "is_hidden" and "is_invisible" attributes Used in the limitation handling templates. More...
 
 isMain ()
 Returns true if this node is the main node. More...
 
 move ($newParentNodeID, $nodeID=0)
 
 object ()
 Returns the eZContentObject associated to this node. More...
 
 pathArray ()
 
 pathWithNames ($regenerateCurrent=false)
 
 remoteID ()
 Get the remote id of content node. More...
 
 removeNodeFromTree ($moveToTrash=true)
 
 removeThis ()
 
 serialize ($options, $contentNodeIDArray, $topNodeIDArray)
 
 setContentObject ($object)
 Sets the current content object for this node. More...
 
 setCurrentLanguage ($languageCode)
 Sets the current node's language to $languageCode. More...
 
 setName ($name)
 
 sortArray ()
 
 store ($fieldFilters=null)
 
 subTree ($params=false)
 
 subTreeCount ($params=array())
 
 subtreeSoleNodeCount ($params=array())
 Returns the number of nodes in the current subtree that have no other placements. More...
 
 updateAndStoreModified ()
 
 updateSubTreePath ($updateParent=true, $nodeMove=false)
 
 url ()
 Returns the node's full url (/content/view/full/...) More...
 
 urlAlias ()
 Returns the node's url alias. More...
 
 viewCount ()
 
- Public Member Functions inherited from eZPersistentObject
 attribute ($attr, $noFunction=false)
 Returns the attribute data for $attr, this is either returned from the member variables or a member function depending on whether the definition field or function attributes matched. More...
 
 attributes ()
 Returns the attributes for this object, taken from the definition fields and function attributes. More...
 
 eZPersistentObject ($row)
 Initializes the object with the $row. More...
 
 fill ($row)
 Tries to fill in the data in the object by using the object definition which is returned by the function definition() and the database row data $row. More...
 
 hasAttribute ($attr)
 Checks if $attr is part of the definition fields or function attributes. More...
 
 hasDirtyData ()
 Returns true if the data is considered dirty and needs to be stored. More...
 
 remove ($conditions=null, $extraConditions=null)
 Removes the object from the database, it will use the keys in the object definition to figure out which table row should be removed unless $conditions is defined as an array with fieldnames. More...
 
 setAttribute ($attr, $val)
 Sets the attribute $attr to the value $val. More...
 
 setHasDirtyData ($hasDirtyData)
 Sets whether the object has dirty data or not. More...
 
 store ($fieldFilters=null)
 Stores the object in the database, uses storeObject() to do the actual job and passes $fieldFilters to it. More...
 
 sync ($fieldFilters=null)
 Makes sure data is stored if the data is considered dirty. More...
 

Static Public Member Functions

static addChildTo ($contentobjectID, $nodeID, $asObject=false, $contentObjectVersion=false)
 
static assignSectionToSubTree ($nodeID, $sectionID, $oldSectionID=false)
 
static availableClassListJsArray ($parameters=false)
 Returns available classes as Js array. More...
 
static calendar ($params=false, $nodeID=0)
 
static classAttributeIDByIdentifier ($identifier)
 Returns the ID of the class attribute with the given ID or false if no class/attribute by that identifier is found. More...
 
static classIDByIdentifier ($identifier)
 Return the ID of the class with the given ID or false if no class by that identifier is found. More...
 
static clearViewCacheForSubtree (eZContentObjectTreeNode $node, $clearForRootNode=true)
 Clears the view cache for a subtree. More...
 
static create ($parentNodeID=null, $contentObjectID=null, $contentObjectVersion=0, $sortField=0, $sortOrder=true)
 Creates a new tree node and returns it. More...
 
static createAttributeFilterSQLStrings (&$attributeFilter, &$sortingInfo=array( 'sortCount'=> 0, 'attributeJoinCount'=> 0), $language=false)
 Returns an array to filter a query by the given attributes in $attributeFilter. More...
 
static createClassFilteringSQLString ($classFilterType, &$classFilterArray)
 Returns an SQL string to filter query results by classes. More...
 
static createExtendedAttributeFilterSQLStrings (&$extendedAttributeFilter)
 Creates a filter array from extended attribute filters. More...
 
static createGroupBySQLStrings (&$outGroupBySelectText, &$outGroupByText, $groupBy)
 
static createMainNodeConditionSQLString ($mainNodeOnly)
 If $mainNodeOnly is set to true, creates an SQL part which makes sure the fetched node(s) are main nodes. More...
 
static createNodesConditionSQLStringFromPath ($nodePath, $includingLastNodeInThePath, $limit=false)
 
static createNotEqParentSQLString ($nodeID, $depth=false, $depthOperator= 'le')
 Creates an SQL part to exclude the parent node from a query to fetch children of the node $nodeID, if needed. More...
 
static createObjectNameFilterConditionSQLString ($filter)
 Creates an SQL part to match objects with a name starting with $filter. More...
 
static createPathConditionAndNotEqParentSQLStrings (&$outPathConditionStr, &$outNotEqParentStr, $nodeID, $depth=false, $depthOperator= 'le')
 Returns an SQL part which makes sure that fetched nodes are (not) part of the given node path and not the parent node. More...
 
static createPathConditionSQLString ($nodePath, $nodeDepth, $depth=false, $depthOperator= 'le')
 Returns an SQL part which makes sure that fetched nodes are (not) part of the given node path. More...
 
static createPermissionCheckingSQL ($limitationList, $treeTableName= 'ezcontentobject_tree', $tableAliasName= 'ezcontentobject_tree')
 
static createShowInvisibleSQLString ($useSettings, $fetchHidden=true)
 
static createSortingSQLStrings ($sortList, $treeTableName= 'ezcontentobject_tree', $allowCustomColumns=false)
 Creates an array with sorting SQL strings to be appended to a query. More...
 
static createVersionNameJoinsSQLString ($useVersionName, $includeAnd=true, $onlyTranslated=false, $lang=false, $treeTableName= 'ezcontentobject_tree')
 
static createVersionNameTablesSQLString ($useVersionName)
 
static createVersionNameTargetsSQLString ($useVersionName)
 
static dataTypeByClassAttributeID ($classAttributeID)
 Returns the datatype of a class attribute. More...
 
static definition ()
 
static deleteNodeWhereParent ($node, $id)
 
static fetch ($nodeID=false, $lang=false, $asObject=true, $conditions=false)
 Fetches a node by ID. More...
 
static fetchAliasesFromNodeList ($nodeList)
 Fetches path_identification_string for a list of nodes. More...
 
static fetchByContentObjectID ($contentObjectID, $asObject=true, $contentObjectVersion=false)
 
static fetchByPath ($pathString, $asObject=true)
 
static fetchByRemoteID ($remoteID, $asObject=true)
 
static fetchByURLPath ($pathString, $asObject=true)
 
static fetchClassIdentifierListByPathString ($nodePath, $withLastNode, $limit=false)
 
static fetchList ($asObject=true, $offset=false, $limit=false)
 Fetches a list of nodes and returns it. More...
 
static fetchListCount ()
 Fetches the number of nodes which exists in the system. More...
 
static fetchNode ($contentObjectID, $parentNodeID)
 
static fetchNodesByPathString ($nodePath, $withLastNode=false, $asObjects=true, $limit=false)
 
static findMainNode ($objectID, $asObject=false)
 Get Main Node Id ( or Main Node if $asObject = true ) by Content Object Id. More...
 
static findMainNodeArray ($objectIDArray, $asObject=true)
 Fetches the main nodes for an array of object id's. More...
 
static findNode ($parentNode, $id, $asObject=false, $remoteID=false)
 
static getClassesJsArray ($node=false, $includeFilter=true, $groupList=false, $fetchID=false, $classes=false)
 Returns available classes as a JSON string. More...
 
static getLimitationList (&$limitation)
 
static getParentNodeId ($nodeID)
 
static getParentNodeIdListByContentObjectID ($objectIDs, $groupByObjectId=false, $onlyMainNode=false)
 Get parent node id's by content object id's. More...
 
static hideSubTree (eZContentObjectTreeNode $node, $modifyRootNode=true)
 Hide a subtree. More...
 
static makeObjectsArray ($array, $with_contentobject=true, array $propertiesOverride=null)
 
static parentDepthLimitationList ()
 
static removeNode ($nodeID=0)
 
static removeSubtrees ($deleteIDArray, $moveToTrash=true, $infoOnly=false)
 
static setUseCurrentUserDraft ($enable)
 Enables / disables Use current user draft mode for data map. More...
 
static setVersionByObjectID ($objectID, $newVersion)
 Given an $objectID, sets the node's object to the version specified by $newVersion. More...
 
static showInvisibleNodes ()
 
static sortArrayBySortFieldAndSortOrder ($sortField, $sortOrder)
 
static sortFieldID ($sortFieldName)
 
static sortFieldName ($sortFieldID)
 
static sortKeyByClassAttributeID ($classAttributeID)
 Returns the sort key for the given classAttributeID or false if it can't be retrieved. More...
 
static subTreeByNodeID ($params=false, $nodeID=0)
 
static subTreeCountByNodeID ($params=array(), $nodeID)
 
static subTreeGroupByDateField ($field, $type)
 
static subTreeMultiPaths ($nodesParams, $listParams=NULL)
 
static subtreeRemovalInformation ($deleteIDArray)
 
static unhideSubTree (eZContentObjectTreeNode $node, $modifyRootNode=true)
 Unhide a subtree. More...
 
static unserialize ($contentNodeDOMNode, $contentObject, $version, $isMain, &$nodeList, &$options, $handlerType= 'ezcontentobject')
 
static updateMainNodeID ($mainNodeID, $objectID, $version=false, $parentMainNodeID, $updateSection=true)
 
static updateNodeVisibility ($node, $parentNode, $recursive=true)
 Depending on the new parent node visibility, recompute "is_invisible" attribute for the given node and its children. More...
 
- Static Public Member Functions inherited from eZPersistentObject
static conditionText ($conditions)
 Calls conditionTextByRow with an empty row and $conditions. More...
 
static conditionTextByRow ($conditions, $row)
 Generates an SQL sentence from the conditions $conditions and row data $row. More...
 
static count ($def, $conds=null, $field=null)
 Fetches the number of rows by using the object definition. More...
 
static definition ()
 Returns the definition for the object, the default implementation is to return an empty array. More...
 
static escapeArray ($array)
 Escapes strings in an array with the help of eZDBInterface::escapeString(). More...
 
static fetchObject ($def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
 Fetches and returns an object based on the given parameters and returns is either as an object or as an array. More...
 
static fetchObjectList ($def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null, $custom_tables=null, $custom_conds=null)
 Creates an SQL query out of the different parameters and returns an array with the result. More...
 
static getShortAttributeName ($db, $def, $attrName)
 Returns the short attribute name (alias) if it's defined, given attribute name otherwise. More...
 
static handleRows ($rows, $class_name, $asObject)
 Creates PHP objects out of the database rows $rows. More...
 
static newObjectOrder ($def, $orderField, $conditions)
 Returns an order value which can be used for new items in table, for instance placement. More...
 
static removeObject ($def, $conditions=null, $extraConditions=null)
 Deletes the object from the table defined in $def with conditions $conditions and extra conditions $extraConditions. More...
 
static reorderObject ($def, $orderField, $conditions, $down=true)
 Moves a row in a database table. More...
 
static replaceFieldsWithShortNames ($db, $fieldDefs, &$fields)
 For the given array $fields treats its keys (for associative array) or values (for non-associative array) as table fields names and replaces them with short names (aliases) found in $fieldDefs. More...
 
static storeObject ($obj, $fieldFilters=null)
 Stores the data in $obj to database. More...
 
static swapRow ($table, $keys, $order_id, $rows, $id1, $id2)
 Sets row id $id2 to have the placement of row id $id1. More...
 
static updateObjectList ($parameters)
 Updates rows matching the given parameters. More...
 

Public Attributes

 $ClassIdentifier = null
 
 $ClassName = null
 
 $CurrentLanguage = false
 
 $Name
 
const SORT_FIELD_CLASS_IDENTIFIER = 6
 
const SORT_FIELD_CLASS_NAME = 7
 
const SORT_FIELD_CONTENTOBJECT_ID = 12
 
const SORT_FIELD_DEPTH = 5
 
const SORT_FIELD_MODIFIED = 3
 
const SORT_FIELD_MODIFIED_SUBNODE = 10
 
const SORT_FIELD_NAME = 9
 
const SORT_FIELD_NODE_ID = 11
 
const SORT_FIELD_PATH = 1
 
const SORT_FIELD_PRIORITY = 8
 
const SORT_FIELD_PUBLISHED = 2
 
const SORT_FIELD_SECTION = 4
 
const SORT_ORDER_ASC = 1
 
const SORT_ORDER_DESC = 0
 
- Public Attributes inherited from eZPersistentObject
 $PersistentDataDirty
 

Protected Member Functions

 hasCurrentSubtreeLimitation (array $policy)
 Checks if provided policy array has a limitation on current subtree. More...
 

Protected Attributes

 $ClassIsContainer = null
 

Static Protected Attributes

static $useCurrentUserDraft = false
 

Private Member Functions

 updatePathIdentificationString ($pathIdentificationName)
 

Static Private Member Functions

static reverseRelatedCount ($nodeIDArray)
 

Member Function Documentation

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

Add a child for this node to the object tree.

Parameters
$contentobjectIDThe ID of the contentobject the child-node should point to.
$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.
static eZContentObjectTreeNode::addChildTo (   $contentobjectID,
  $nodeID,
  $asObject = false,
  $contentObjectVersion = false 
)
static

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.
$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().

eZContentObjectTreeNode::adjustPathElement (   $element,
  $useParentFromNodeObject = false 
)

Checks the path element $element against reserved words and existing elements. If the path element is already used, it will append a number and try again.

The adjusted path element is returned.

Parameters
$elementThe desired url element name
$useParentFromNodeObjectUse the parent from node object as a base for checking name collisions. This is needed when moving nodes, and the url entries are not updated yet.
echo $node->adjustPathElement( 'Content' ); // outputs Content1

Referenced by checkPath(), and updateSubTreePath().

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

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(), eZSiteInstaller\setSection(), eZContentOperationCollection\swapNode(), eZSiteInstaller\swapNodes(), updateMainNodeID(), eZContentOperationCollection\updateSection(), and eZContentOperationCollection\updateSectionID().

eZContentObjectTreeNode::availableClassesJsArray ( )

Returns available classes as Js array.

Checks if the node is container, if yes emptyStr will be returned.

Returns
string
static eZContentObjectTreeNode::availableClassListJsArray (   $parameters = false)
static

Returns available classes as Js array.

Checks for ini settings.

Parameters
array | bool$parameters
Returns
string

Referenced by availableClassesJsArray(), eZContentStructureTreeOperator\createContentStructureNode(), and eZContentStructureTreeOperator\initContentStructureTree().

static eZContentObjectTreeNode::calendar (   $params = false,
  $nodeID = 0 
)
static
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.

Returns
bool
eZContentObjectTreeNode::canCreate ( )

Returns true if the current user can create a new node as child of this node.

Returns
bool
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.
$fetchIDA 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.

Returns
bool
eZContentObjectTreeNode::canHide ( )

Returns true if the node can be hidden by the current user.

Returns
bool
eZContentObjectTreeNode::canMoveFrom ( )

Returns true if the node can be moved by the current user.

Returns
bool
eZContentObjectTreeNode::canMoveTo (   $classID = false)

Returns true if a node of class $classID can be moved to the current node by the current user.

Parameters
bool$classID
Returns
bool
eZContentObjectTreeNode::canPdf ( )

Returns true if the current user can create a pdf of this content object.

Returns
bool
eZContentObjectTreeNode::canRead ( )

Returns true if the node can be read by the current user.

Returns
bool

Referenced by eZNodeviewfunctions\contentViewGenerate().

eZContentObjectTreeNode::canRemove ( )

Returns true if the node can be removed by the current user.

Returns
bool
eZContentObjectTreeNode::canRemoveLocation ( )

Returns true if current user can add object locations to current node.

Returns
bool
eZContentObjectTreeNode::canSwap ( )

Returns true if a node can be swaped by the current user.

Returns
bool
eZContentObjectTreeNode::canViewEmbed ( )

Returns true if the node can be viewed as embeded object by the current user.

Returns
bool
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.

Referenced by pathWithNames().

eZContentObjectTreeNode::children ( )

Returns the first level children in sorted order.

Returns
array|null
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.

static eZContentObjectTreeNode::classAttributeIDByIdentifier (   $identifier)
static

Returns the ID of the class attribute with the given ID or false if no class/attribute by that identifier is found.

If multiple classes have the same identifier, the first found is returned.

Parameters
string$identifier
Returns
int|bool

Referenced by eZSearchEngine\buildSortSQL(), createAttributeFilterSQLStrings(), createSortingSQLStrings(), eZContentFunctionCollection\fetchRelatedObjects(), eZContentFunctionCollection\fetchRelatedObjectsCount(), eZContentFunctionCollection\fetchReverseRelatedObjects(), and eZContentFunctionCollection\fetchReverseRelatedObjectsCount().

static eZContentObjectTreeNode::classIDByIdentifier (   $identifier)
static

Return the ID of the class with the given ID or false if no class by that identifier is found.

If multiple classes have the same identifier, the first found is returned.

Parameters
string$identifier
Returns
int|bool

Referenced by eZContentOperationCollection\createFeedForNode(), and eZRSSEditFunction\setItemDefaults().

eZContentObjectTreeNode::classIdentifier ( )

Returns the node's class identifier.

Returns
string|bool|string|null
eZContentObjectTreeNode::classIsContainer ( )

Returns 1 if the node's class is a container class, 0 otherwise.

Returns
int|null
eZContentObjectTreeNode::classListFromPolicy (   $policy,
  $allowedLanguageCodes = false 
)

Referenced by canCreateClassList().

eZContentObjectTreeNode::className ( )

Returns the node's class name.

Returns
string|null
static eZContentObjectTreeNode::clearViewCacheForSubtree ( eZContentObjectTreeNode  $node,
  $clearForRootNode = true 
)
static

Clears the view cache for a subtree.

Parameters
eZContentObjectTreeNode$node
bool$clearForRootNode
Returns
bool

Referenced by hideSubTree(), and unhideSubTree().

eZContentObjectTreeNode::contentObjectVersionObject (   $asObject = true)

Returns the eZContentObjectVersionObject of the current node.

Parameters
bool$asObject
Returns
eZContentObjectVersion|array|bool
static eZContentObjectTreeNode::create (   $parentNodeID = null,
  $contentObjectID = null,
  $contentObjectVersion = 0,
  $sortField = 0,
  $sortOrder = true 
)
static

Creates a new tree node and returns it.

The attribute remote_id will get an automatic and unique value.

Parameters
int$parentNodeIDThe ID of the parent or null if the node is not known yet.
int$contentObjectIDThe ID of the object it points to or null if it is not known yet.
int$contentObjectVersionThe version of the object or 0 if not known yet.
int$sortFieldNumber describing the field to sort by, or 0 if not known yet.
bool$sortOrderWhich way to sort, true means ascending while false is descending.
Returns
eZContentObjectTreeNode

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

static eZContentObjectTreeNode::createAttributeFilterSQLStrings ( $attributeFilter,
$sortingInfo = array( 'sortCount' => 0, 'attributeJoinCount' => 0 ),
  $language = false 
)
static

Returns an array to filter a query by the given attributes in $attributeFilter.

Parameters
array | bool$attributeFilter
array$sortingInfo
array | bool$language
Returns
array|bool

Referenced by calendar(), subTreeByNodeID(), subTreeCountByNodeID(), subTreeMultiPaths(), and eZContentObjectTrashNode\trashList().

static eZContentObjectTreeNode::createClassFilteringSQLString (   $classFilterType,
$classFilterArray 
)
static

Returns an SQL string to filter query results by classes.

Parameters
string | bool$classFilterType
array$classFilterArray
Returns
string|bool

Referenced by calendar(), eZContentStructureTreeOperator\subTree(), subTreeByNodeID(), and subTreeMultiPaths().

static eZContentObjectTreeNode::createExtendedAttributeFilterSQLStrings ( $extendedAttributeFilter)
static

Creates a filter array from extended attribute filters.

The filter array includes tables, joins, columns and grouping information

Parameters
array$extendedAttributeFilter
Returns
array

Referenced by calendar(), subTreeByNodeID(), subTreeCountByNodeID(), and subTreeMultiPaths().

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

static

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

static eZContentObjectTreeNode::createMainNodeConditionSQLString (   $mainNodeOnly)
static

If $mainNodeOnly is set to true, creates an SQL part which makes sure the fetched node(s) are main nodes.

Parameters
bool$mainNodeOnly
Returns
string

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

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

static

Parameters
$limitmaximum number of nodes in the path to use, starting from last node

Referenced by fetchNodesByPathString().

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

Creates an SQL part to exclude the parent node from a query to fetch children of the node $nodeID, if needed.

Parameters
int$nodeID
int | bool$depth
string$depthOperator
Returns
string

Referenced by createPathConditionAndNotEqParentSQLStrings().

static eZContentObjectTreeNode::createObjectNameFilterConditionSQLString (   $filter)
static

Creates an SQL part to match objects with a name starting with $filter.

If $filter is "others", the SQL part will match only names which do NOT start with a letter from the alphabet.

See Also
eZAlphabetOperator::fetchAlphabet()
Parameters
string$filter
Returns
string

Referenced by subTreeByNodeID(), subTreeCountByNodeID(), and eZContentObjectTrashNode\trashList().

static eZContentObjectTreeNode::createPathConditionAndNotEqParentSQLStrings ( $outPathConditionStr,
$outNotEqParentStr,
  $nodeID,
  $depth = false,
  $depthOperator = 'le' 
)
static

Returns an SQL part which makes sure that fetched nodes are (not) part of the given node path and not the parent node.

Parameters
string$outPathConditionStr
string$outNotEqParentStr
int$nodeID
bool$depth
string$depthOperator
Returns
bool

Referenced by calendar(), eZContentFunctionCollection\fetchKeyword(), eZContentFunctionCollection\fetchKeywordCount(), eZContentStructureTreeOperator\subTree(), subTreeByNodeID(), subTreeCountByNodeID(), and subTreeMultiPaths().

static eZContentObjectTreeNode::createPathConditionSQLString (   $nodePath,
  $nodeDepth,
  $depth = false,
  $depthOperator = 'le' 
)
static

Returns an SQL part which makes sure that fetched nodes are (not) part of the given node path.

Parameters
string$nodePath
int$nodeDepth
bool$depth
string$depthOperator
Returns
string

Referenced by createPathConditionAndNotEqParentSQLStrings().

static eZContentObjectTreeNode::createPermissionCheckingSQL (   $limitationList,
  $treeTableName = 'ezcontentobject_tree',
  $tableAliasName = 'ezcontentobject_tree' 
)
static
static eZContentObjectTreeNode::createShowInvisibleSQLString (   $useSettings,
  $fetchHidden = true 
)
static

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(), subTreeByNodeID(), subTreeCountByNodeID(), and subTreeMultiPaths().

static eZContentObjectTreeNode::createSortingSQLStrings (   $sortList,
  $treeTableName = 'ezcontentobject_tree',
  $allowCustomColumns = false 
)
static

Creates an array with sorting SQL strings to be appended to a query.

Parameters
array | bool$sortList
string$treeTableName
bool$allowCustomColumns
Returns
array

Referenced by eZContentFunctionCollection\fetchKeyword(), eZContentObject\relatedObjects(), eZContentStructureTreeOperator\subTree(), subTreeByNodeID(), subTreeMultiPaths(), and eZContentObjectTrashNode\trashList().

static eZContentObjectTreeNode::createVersionNameJoinsSQLString (   $useVersionName,
  $includeAnd = true,
  $onlyTranslated = false,
  $lang = false,
  $treeTableName = 'ezcontentobject_tree' 
)
static
Deprecated:
Since 5.0
static eZContentObjectTreeNode::createVersionNameTablesSQLString (   $useVersionName)
static
Deprecated:
Since 5.0
static eZContentObjectTreeNode::createVersionNameTargetsSQLString (   $useVersionName)
static
Deprecated:
Since 5.0
eZContentObjectTreeNode::creator ( )

Returns the creator of the version published in the node.

Returns
eZContentObject
eZContentObjectTreeNode::currentLanguage ( )

Returns the node's current language.

Returns
string

Referenced by eZNodeviewfunctions\generateNodeViewData().

eZContentObjectTreeNode::dataMap ( )

Returns an array with all the content object attributes where the keys are the attribute identifiers.

See Also
eZContentObject::fetchDataMap()
Returns
eZContentObjectAttribute[]
static eZContentObjectTreeNode::dataTypeByClassAttributeID (   $classAttributeID)
static

Returns the datatype of a class attribute.

Parameters
int$classAttributeID
Returns
string

Referenced by createSortingSQLStrings().

static eZContentObjectTreeNode::definition ( )
static
static eZContentObjectTreeNode::deleteNodeWhereParent (   $node,
  $id 
)
static
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())

Initializes the object with the $row.

It will try to set each field taken from the database row. Calls fill to do the job. If $row is an integer, it will try to fetch it from the database using it as the unique ID.

Parameters
int | array$row

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

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

Fetches a node by ID.

Parameters
int | array | bool$nodeIDEither a node ID or array of node IDs
string | bool$langlanguage code to fetch the node in. If not provided, the prioritized language list is used
bool$asObjectTrue to fetch the node as an eZContentObjectTreeNode, false to fetch its attributes as an array
array | bool$conditionsAn associative array (field => value) of fetch conditions. Will be applied as is to the SQL query
Returns
eZContentObjectTreeNode

Referenced by eZContentObjectPackageHandler\add(), eZContentOperationCollection\addAssignment(), addChildTo(), eZPolicyLimitation\allValuesAsArrayWithNames(), assignSectionToSubTree(), eZRole\assignToUser(), availableClassListJsArray(), eZContentFunctionCollection\canInstantiateClassList(), eZContentOperationCollection\changeHideStatus(), eZContentOperationCollection\changeSortOrder(), eZContentObjectVersion\checkAccess(), eZContentUpload\checkAccess(), eZContentObject\checkAccess(), checkAccess(), checkNodeAssignments(), checkNodeMovements(), eZContentObject\classListFromPolicy(), classListFromPolicy(), eZSubtreeCache\cleanupByNodeIDs(), eZNodeviewfunctions\contentViewGenerate(), copyObject(), copyPublishContentObject(), copySubtree(), eZContentFunctions\createAndPublishObject(), eZContentOperationCollection\createFeedForNode(), eZObjectRelationListType\createNewObject(), createPathConditionAndNotEqParentSQLStrings(), eZContentOperationCollection\deleteObject(), eZRSSImport\destinationPath(), eZSimplifiedXMLEditOutput\eznodeHref(), eZShopFunctionCollection\fetchBestSellList(), ezpContentLocation\fetchByNodeId(), fetchByPath(), fetchByRemoteID(), fetchByURLPath(), eZContentFunctionCollection\fetchContentNode(), eZContentFunctionCollection\fetchKeyword(), eZContentFunctionCollection\fetchMostViewedTopList(), eZContentBrowseBookmark\fetchNode(), eZContentBrowseRecent\fetchNode(), eZWebDAVContentBackend\fetchNodeByTranslation(), eZSubtreeNotificationRule\fetchNodesForUserID(), eZCollaborationFunctionCollection\fetchObjectTreeCount(), fetchParent(), eZWebDAVContentBackend\fetchParentNodeByTranslation(), eZContentFunctionCollection\fetchSameClassAttributeNodeList(), eZContentFunctionCollection\fetchTipafriendTopList(), findMainNode(), ezpContent\fromNodeId(), eZContentObjectPackageHandler\generateFetchAliasArray(), eZContentCacheManager\generateObjectViewCache(), eZContentObjectPackageHandler\generatePackage(), eZContentObjectPackageCreator\generatePackageInformation(), eZRSSExportItem\getAttributeMappings(), eZNodeAssignment\getParentNode(), eZSSLZone\getSSLZones(), eZLDAPUser\goAndPublishGroups(), eZContentObjectPackageHandler\handleParameters(), eZHTTPHeader\headerOverrideArray(), eZRSSExport\imageNode(), eZRSSExport\imagePath(), importRSSItem(), eZContentStructureTreeOperator\initContentStructureTree(), eZObjectRelationListType\initializeObjectAttribute(), eZContentObjectPackageInstaller\initializeTopNodes(), eZTreeMenuOperator\modify(), eZTopMenuOperator\modify(), eZContentObjectTreeNodeOperations\move(), move(), eZSubtreeNotificationRule\node(), eZWorkflowProcess\node(), eZContentUpload\nodeAliasID(), eZContentObjectAssignmentHandler\nodeID(), eZContentObjectTrashNode\originalParent(), eZContentObject\parentNodes(), eZXMLOutputHandler\prefetch(), eZSimplifiedXMLInputParser\publishHandlerEmbed(), eZSimplifiedXMLInputParser\publishHandlerLink(), eZContentOperationCollection\publishNode(), eZContentOperationCollection\readObject(), eZContentOperationCollection\removeFeedForNode(), removeNode(), eZContentOperationCollection\removeNodes(), removeSubtrees(), eZContentObject\removeThis(), reverseRelatedCount(), eZRSSEditFunction\setItemDefaults(), eZContentObjectAssignmentHandler\setupAssignments(), eZRSSExportItem\sourceNode(), eZPDFExport\sourceNode(), eZRSSExportItem\sourcePath(), eZContentStructureTreeOperator\subTree(), eZContentOperationCollection\swapNode(), eZSiteInstaller\swapNodes(), eZXMLTextType\transformLinksToRemoteLinks(), and eZContentOperationCollection\updatePriority().

static eZContentObjectTreeNode::fetchAliasesFromNodeList (   $nodeList)
static

Fetches path_identification_string for a list of nodes.

Parameters
array(int)$nodeList
Returns
array Associative array
static eZContentObjectTreeNode::fetchByContentObjectID (   $contentObjectID,
  $asObject = true,
  $contentObjectVersion = false 
)
static
eZContentObjectTreeNode::fetchByCRC (   $pathStr)
static eZContentObjectTreeNode::fetchByPath (   $pathString,
  $asObject = true 
)
static
static eZContentObjectTreeNode::fetchClassIdentifierListByPathString (   $nodePath,
  $withLastNode,
  $limit = false 
)
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.
$limitmaximum number of nodes in the path to use, starting from last node
Returns
An array with class identifier and node ID.

Example

Referenced by eZContentCacheManager\nodeListForObject().

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

Fetches a list of nodes and returns it.

Offset and limitation can be set if needed.

Parameters
bool$asObject
int | bool$offset
int | bool$limit
Returns
eZContentObjectTreeNode[]
static eZContentObjectTreeNode::fetchListCount ( )
static

Fetches the number of nodes which exists in the system.

Returns
int
static 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(), eZContentObjectTreeNodeOperations\move(), eZContentOperationCollection\publishNode(), and eZLDAPUser\publishUpdateUser().

static 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
$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.
$limitmaximum number of nodes in the path to use, starting from last node

Referenced by fetchClassIdentifierListByPathString(), and fetchPath().

eZContentObjectTreeNode::fetchParent ( )
eZContentObjectTreeNode::fetchPath ( )
static eZContentObjectTreeNode::findMainNode (   $objectID,
  $asObject = false 
)
static

Get Main Node Id ( or Main Node if $asObject = true ) by Content Object Id.

Parameters
int$objectID
boolean$asObject
Returns
int|null

Referenced by eZContentObject\mainNode(), and eZContentObject\mainNodeID().

static eZContentObjectTreeNode::findMainNodeArray (   $objectIDArray,
  $asObject = true 
)
static

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

Parameters
array(int)$objectIDArray an array of object IDs
bool$asObjectWether to return the result as an array of eZContentObjectTreeNode (true) or as an array of associative arrays (false)
Returns
array(array|eZContentObjectTreeNode)

Referenced by eZKeyword\relatedObjects().

static eZContentObjectTreeNode::findNode (   $parentNode,
  $id,
  $asObject = false,
  $remoteID = false 
)
static
static eZContentObjectTreeNode::getClassesJsArray (   $node = false,
  $includeFilter = true,
  $groupList = false,
  $fetchID = false,
  $classes = false 
)
static

Returns available classes as a JSON string.

Parameters
eZContentObjectTreeNode | bool$node
array | bool$includeFilter
array | bool$groupList
int | bool$fetchID
array | bool$classes
Returns
string

Referenced by availableClassListJsArray().

eZContentObjectTreeNode::getName (   $language = false)
static eZContentObjectTreeNode::getParentNodeId (   $nodeID)
static

Get parent node id by node id

Parameters
$nodeIDthe node id you want parent node id for.
static eZContentObjectTreeNode::getParentNodeIdListByContentObjectID (   $objectIDs,
  $groupByObjectId = false,
  $onlyMainNode = false 
)
static

Get parent node id's by content object id's.

Since
Version 4.1
Parameters
int | array$objectIDs
bool$groupByObjectIdgroups parent node ids by object id they belong to.
bool$onlyMainNodelimits result to parent node id of main node.
Returns
array Returns array of parent node id's

Referenced by eZContentObject\checkGroupLimitationAccess(), eZContentObject\mainParentNodeID(), and eZContentObject\parentNodes().

eZContentObjectTreeNode::hasContentObject ( )

Checks if the node's contentobject has already loaded.

Returns
bool

Referenced by object(), and setCurrentLanguage().

eZContentObjectTreeNode::hasCurrentSubtreeLimitation ( array  $policy)
protected

Checks if provided policy array has a limitation on current subtree.

Parameters
array$policy
Returns
bool

Referenced by canCreateClassList().

eZContentObjectTreeNode::hiddenInvisibleString ( )

Returns combined string representation of both "is_hidden" and "is_invisible" attributes.

Todo:
This method probably should be removed in the future.
Returns
string
eZContentObjectTreeNode::hiddenStatusString ( )

Returns combined string representation of both "is_hidden" and "is_invisible" attributes Used in the limitation handling templates.

Returns
string
static eZContentObjectTreeNode::hideSubTree ( eZContentObjectTreeNode  $node,
  $modifyRootNode = true 
)
static

Hide a subtree.

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.

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.

Parameters
eZContentObjectTreeNode$nodeRoot node of the subtree
bool$modifyRootNodeWhether to modify the root node (true/false)

Referenced by eZContentOperationCollection\changeHideStatus(), and updateNodeVisibility().

eZContentObjectTreeNode::isMain ( )

Returns true if this node is the main node.

Returns
bool

Referenced by eZNodeviewfunctions\generateNodeViewData().

static eZContentObjectTreeNode::makeObjectsArray (   $array,
  $with_contentobject = true,
array  $propertiesOverride = null 
)
static
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 ( )
static eZContentObjectTreeNode::parentDepthLimitationList ( )
static
Returns
array
eZContentObjectTreeNode::pathArray ( )
eZContentObjectTreeNode::pathWithNames (   $regenerateCurrent = false)
Returns
an url alias for the current node. It will generate a unique alias.

Referenced by urlAlias().

eZContentObjectTreeNode::remoteID ( )

Get the remote id of content node.

If there is no remote ID a new unique one will be generated.

The remote ID is often used to synchronise imports and exports.

Returns
string
static eZContentObjectTreeNode::removeNode (   $nodeID = 0)
static
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.
static 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 eZContentOperationCollection\deleteObject(), eZContentObjectOperations\remove(), eZContentOperationCollection\removeOldNodes(), subtreeRemovalInformation(), and eZContentObjectPackageHandler\uninstall().

eZContentObjectTreeNode::removeThis ( )

Removes the current node. Use ->removeNodeFromTree() if you need to handle main node change + remove object if needed

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 removeNodeFromTree().

static eZContentObjectTreeNode::reverseRelatedCount (   $nodeIDArray)
staticprivate

Return reverse related count for specified node

Parameters
$nodeIDArray,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.

Parameters
eZContentObject$object
eZContentObjectTreeNode::setCurrentLanguage (   $languageCode)

Sets the current node's language to $languageCode.

Parameters
string$languageCode

Referenced by eZNodeviewfunctions\generateNodeViewData().

eZContentObjectTreeNode::setName (   $name)
static eZContentObjectTreeNode::setUseCurrentUserDraft (   $enable)
static

Enables / disables Use current user draft mode for data map.

When this mode is enabled (disabled by default), current user draft is used if available on all dataMap calls.

Since
4.7
Parameters
bool$enable
static eZContentObjectTreeNode::setVersionByObjectID (   $objectID,
  $newVersion 
)
static

Given an $objectID, sets the node's object to the version specified by $newVersion.

Parameters
int$objectID
int$newVersion

Referenced by eZContentOperationCollection\setObjectStatusPublished().

static eZContentObjectTreeNode::showInvisibleNodes ( )
static

static

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

Referenced by eZNodeviewfunctions\contentViewGenerate(), createShowInvisibleSQLString(), and eZRSSExport\generateFeed().

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().

static 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().

static eZContentObjectTreeNode::sortFieldID (   $sortFieldName)
static
Returns
the numeric sort field ID for the sort field name $sortFieldName. Gives a warning if the name is unknown and returns self::SORT_FIELD_PATH.

Referenced by eZContentClassPackageHandler\install(), and unserialize().

static eZContentObjectTreeNode::sortFieldName (   $sortFieldID)
static
Returns
the sort field name for the numeric sort field ID $sortFieldID. Gives a warning if the ID is unknown and returns 'path'.

Referenced by eZContentClassPackageHandler\classDOMTree(), serialize(), and sortArrayBySortFieldAndSortOrder().

static eZContentObjectTreeNode::sortKeyByClassAttributeID (   $classAttributeID)
static

Returns the sort key for the given classAttributeID or false if it can't be retrieved.

Parameters
int$classAttributeID
Returns
int|string|bool

Referenced by eZSearchEngine\buildSortSQL(), createAttributeFilterSQLStrings(), and createSortingSQLStrings().

eZContentObjectTreeNode::store (   $fieldFilters = null)
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::subTree (   $params = false)
Parameters
array | bool$params
Returns
array|null

Referenced by children(), and clearViewCacheForSubtree().

eZContentObjectTreeNode::subTreeCount (   $params = array())

Count number of subnodes

Parameters
paramsarray

Referenced by childrenCount(), and clearViewCacheForSubtree().

static eZContentObjectTreeNode::subTreeCountByNodeID (   $params = array(),
  $nodeID 
)
static
static eZContentObjectTreeNode::subTreeGroupByDateField (   $field,
  $type 
)
static

Referenced by createGroupBySQLStrings().

static eZContentObjectTreeNode::subTreeMultiPaths (   $nodesParams,
  $listParams = NULL 
)
static

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().

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

Parameters
array$params
Returns
int
static eZContentObjectTreeNode::unhideSubTree ( eZContentObjectTreeNode  $node,
  $modifyRootNode = true 
)
static

Unhide a subtree.

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

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.

Parameters
eZContentObjectTreeNode$nodeRoot node of the subtree
bool$modifyRootNodeWhether to modify the root node (true/false)

Referenced by eZContentOperationCollection\changeHideStatus(), and updateNodeVisibility().

static 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(), classListFromPolicy(), 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.

Referenced by hideSubTree(), store(), and unhideSubTree().

static eZContentObjectTreeNode::updateMainNodeID (   $mainNodeID,
  $objectID,
  $version = false,
  $parentMainNodeID,
  $updateSection = true 
)
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\publishUpdateUser(), removeNodeFromTree(), eZContentOperationCollection\removeNodes(), and eZContentOperationCollection\updateMainAssignment().

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

Parameters
eZContentObjectTreeNode$node
eZContentObjectTreeNode$parentNode
bool$recursive

Referenced by copyObject(), eZWebDAVContentBackend\copyObject(), eZWebDAVContentBackend\copyObjectSameDirectory(), copyPublishContentObject(), and move().

eZContentObjectTreeNode::updatePathIdentificationString (   $pathIdentificationName)
private

Updates the path_identification_string field in ezcontentobject_tree by fetching the value from the parent and appending $pathIdentificationName.

Note
This stores the current object to the database

Referenced by updateSubTreePath().

eZContentObjectTreeNode::updateSubTreePath (   $updateParent = true,
  $nodeMove = false 
)
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 ( )

Returns the node's full url (/content/view/full/...)

Returns
string
eZContentObjectTreeNode::urlAlias ( )

Returns the node's url alias.

Returns
string

Referenced by url().

eZContentObjectTreeNode::viewCount ( )

Get amount views of content node.

Member Data Documentation

eZContentObjectTreeNode::$ClassIdentifier = null

Referenced by classIdentifier().

eZContentObjectTreeNode::$ClassIsContainer = null
protected

Referenced by classIsContainer().

eZContentObjectTreeNode::$ClassName = null

Referenced by className().

eZContentObjectTreeNode::$CurrentLanguage = false
eZContentObjectTreeNode::$Name

Referenced by getName().

eZContentObjectTreeNode::$useCurrentUserDraft = false
staticprotected
const eZContentObjectTreeNode::SORT_FIELD_CLASS_IDENTIFIER = 6
const eZContentObjectTreeNode::SORT_FIELD_CLASS_NAME = 7
const eZContentObjectTreeNode::SORT_FIELD_CONTENTOBJECT_ID = 12
const eZContentObjectTreeNode::SORT_FIELD_DEPTH = 5
const eZContentObjectTreeNode::SORT_FIELD_MODIFIED = 3
const eZContentObjectTreeNode::SORT_FIELD_MODIFIED_SUBNODE = 10
const eZContentObjectTreeNode::SORT_FIELD_NAME = 9
const eZContentObjectTreeNode::SORT_FIELD_NODE_ID = 11
const eZContentObjectTreeNode::SORT_FIELD_PATH = 1
const eZContentObjectTreeNode::SORT_FIELD_PRIORITY = 8
const eZContentObjectTreeNode::SORT_FIELD_PUBLISHED = 2
const eZContentObjectTreeNode::SORT_FIELD_SECTION = 4
const eZContentObjectTreeNode::SORT_ORDER_ASC = 1
const eZContentObjectTreeNode::SORT_ORDER_DESC = 0

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