Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Static Private Member Functions | List of all members
eZContentObjectTreeNode Class Reference
Inheritance diagram for eZContentObjectTreeNode:

## Public Member Functions
| __construct ( $row=array())
| eZContentObjectTreeNode ( $row=array())
| dataMap ()
| remoteID ()
| isMain ()
| canRead ()
| canPdf ()
| canViewEmbed ()
| canEdit ()
| canHide ()
| canCreate ()
| canRemove ()
| canMoveFrom ()
| canMoveTo ( $classID=false)
| canSwap ()
| canAddLocation ()
| canRemoveLocation ()
| subTree ( $params=false)
| subTreeCount ( $params=array())
| childrenByName ( $name)
| children ()
| childrenCount ( $checkPolicies=true)
| viewCount ()
| sortArray ()
| fetchByCRC ( $pathStr)
| fetchParent ()
| pathArray ()
| fetchPath ()
| addChild ( $contentobjectID, $asObject=false, $contentObjectVersion=false)
| pathWithNames ( $regenerateCurrent=false)
| checkPath ( $path)
| adjustPathElement ( $element, $useParentFromNodeObject=false)
| updateSubTreePath ( $updateParent=true, $nodeMove=false)
| removeThis ()
| removeNodeFromTree ( $moveToTrash=true)
| subtreeSoleNodeCount ( $params=array())
| move ( $newParentNodeID, $nodeID=0)
| checkAccess ( $functionName, $originalClassID=false, $parentClassID=false, $returnAccessList=false, $language=false)
| classListFromPolicy ( $policy, $allowedLanguageCodes=false)
| canCreateClassList ( $asObject=false, $includeFilter=true, $groupList=false, $fetchID=false)
| getName ( $language=false)
| setName ( $name)
| serialize ( $options, $contentNodeIDArray, $topNodeIDArray)
| updateAndStoreModified ()
| store ( $fieldFilters=null)
| object ()
| hasContentObject ()
| setContentObject ( $object)
| creator ()
| contentObjectVersionObject ( $asObject=true)
| urlAlias ()
| url ()
| classIdentifier ()
| className ()
| classIsContainer ()
| hiddenInvisibleString ()
| hiddenStatusString ()
| currentLanguage ()
| setCurrentLanguage ( $languageCode)
| availableClassesJsArray ()
| isNodeTrashAllowed ()
Public Member Functions inherited from eZPersistentObject
| eZPersistentObject ( $row=null)
| fill ( $row)
| remove ( $conditions=null, $extraConditions=null)
| sync ( $fieldFilters=null)
| attributes ()
| hasAttribute ( $attr)
| attribute ( $attr, $noFunction=false)
| setAttribute ( $attr, $val)
| hasDirtyData ()
| setHasDirtyData ( $hasDirtyData)

## Static Public Member Functions
static | definition ()
static | create ( $parentNodeID=null, $contentObjectID=null, $contentObjectVersion=0, $sortField=0, $sortOrder=true)
static | setUseCurrentUserDraft ( $enable)
static | classAttributeIDByIdentifier ( $identifier)
static | classIDByIdentifier ( $identifier)
static | sortKeyByClassAttributeID ( $classAttributeID)
static | dataTypeByClassAttributeID ( $classAttributeID)
static | fetchListCount ()
static | fetchList ( $asObject=true, $offset=false, $limit=false)
static | createSortingSQLStrings ( $sortList, $treeTableName='ezcontentobject_tree', $allowCustomColumns=false)
static | createClassFilteringSQLString ( $classFilterType, &$classFilterArray)
static | createExtendedAttributeFilterSQLStrings (&$extendedAttributeFilter)
static | createMainNodeConditionSQLString ( $mainNodeOnly)
static | createObjectNameFilterConditionSQLString ( $filter)
static | createAttributeFilterSQLStrings (&$attributeFilter, &$sortingInfo=array( 'sortCount'=> 0, 'attributeJoinCount'=> 0), $language=false)
static | createNotEqParentSQLString ( $nodeID, $depth=false, $depthOperator='le')
static | createPathConditionSQLString ( $nodePath, $nodeDepth, $depth=false, $depthOperator='le')
static | createPathConditionAndNotEqParentSQLStrings (&$outPathConditionStr, &$outNotEqParentStr, $nodeID, $depth=false, $depthOperator='le')
static | createGroupBySQLStrings (&$outGroupBySelectText, &$outGroupByText, $groupBy)
static | createVersionNameTablesSQLString ( $useVersionName)
static | createVersionNameTargetsSQLString ( $useVersionName)
static | createVersionNameJoinsSQLString ( $useVersionName, $includeAnd=true, $onlyTranslated=false, $lang=false, $treeTableName='ezcontentobject_tree')
static | createPermissionCheckingSQL ( $limitationList, $treeTableName='ezcontentobject_tree', $tableAliasName='ezcontentobject_tree')
static | createNodesConditionSQLStringFromPath ( $nodePath, $includingLastNodeInThePath, $limit=false)
static | createShowInvisibleSQLString ( $useSettings, $fetchHidden=true)
static | showInvisibleNodes ()
static | getLimitationList (&$limitation)
static | subTreeByNodeID ( $params=false, $nodeID=0)
static | subTreeMultiPaths ( $nodesParams, $listParams=NULL)
static | subTreeGroupByDateField ( $field, $type)
static | subTreeCountByNodeID ( $params, $nodeID)
static | calendar ( $params=false, $nodeID=0)
static | sortFieldName ( $sortFieldID)
static | sortFieldID ( $sortFieldName)
static | sortArrayBySortFieldAndSortOrder ( $sortField, $sortOrder)
static | assignSectionToSubTree ( $nodeID, $sectionID, $oldSectionID=false, $updateSearchIndexes=true)
static | updateMainNodeID ( $mainNodeID, $objectID, $version, $parentMainNodeID, $updateSection=true)
static | fetchByContentObjectID ( $contentObjectID, $asObject=true, $contentObjectVersion=false)
static | fetchByRemoteID ( $remoteID, $asObject=true)
static | fetchByPath ( $pathString, $asObject=true)
static | fetchByURLPath ( $pathString, $asObject=true)
static | fetchAliasesFromNodeList ( $nodeList)
static | findMainNode ( $objectID, $asObject=false)
static | findMainNodeArray ( $objectIDArray, $asObject=true)
static | fetch ( $nodeID=false, $lang=false, $asObject=true, $conditions=false)
static | fetchNode ( $contentObjectID, $parentNodeID)
static | fetchNodesByPathString ( $nodePath, $withLastNode=false, $asObjects=true, $limit=false)
static | fetchClassIdentifierListByPathString ( $nodePath, $withLastNode, $limit=false)
static | addChildTo ( $contentobjectID, $nodeID, $asObject=false, $contentObjectVersion=false)
static | removeNode ( $nodeID=0)
static | subtreeRemovalInformation ( $deleteIDArray)
static | removeSubtrees ( $deleteIDArray, $moveToTrash=true, $infoOnly=false)
static | makeObjectsArray ( $array, $with_contentobject=true, array|null $propertiesOverride=null, $lang=null)
static | getParentNodeId ( $nodeID)
static | getParentNodeIdListByContentObjectID ( $objectIDs, $groupByObjectId=false, $onlyMainNode=false)
static | deleteNodeWhereParent ( $node, $id)
static | findNode ( $parentNode, $id, $asObject=false, $remoteID=false)
static | unserialize ( $contentNodeDOMNode, $contentObject, $version, $isMain, &$nodeList, &$options, $handlerType='ezcontentobject')
static | hideSubTree (eZContentObjectTreeNode $node, $modifyRootNode=true)
static | unhideSubTree (eZContentObjectTreeNode $node, $modifyRootNode=true)
static | updateNodeVisibility ( $node, $parentNode, $recursive=true)
static | clearViewCacheForSubtree (eZContentObjectTreeNode $node, $clearForRootNode=true)
static | setVersionByObjectID ( $objectID, $newVersion)
static | parentDepthLimitationList ()
static | availableClassListJsArray ( $parameters=false)
static | getClassesJsArray ( $node=false, $includeFilter=true, $groupList=false, $fetchID=false, $classes=false)
static | getObjectIdsInNodeSubTree ($node)
Static Public Member Functions inherited from eZPersistentObject
static | replaceFieldsWithShortNames (eZDBInterface $db, array $fieldDefs, &$fields)
static | count ( $def, $conds=null, $field=null)
static | fetchObject ( $def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
static | removeObject ( $def, $conditions=null, $extraConditions=null)
static | storeObject ( $obj, $fieldFilters=null)
static | conditionText ( $conditions)
static | conditionTextByRow ( $conditions, $row)
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)
static | handleRows ( $rows, $class_name, $asObject)
static | swapRow ( $table, $keys, $order_id, $rows, $id1, $id2)
static | newObjectOrder ( $def, $orderField, $conditions)
static | reorderObject ( $def, $orderField, $conditions, $down=true)
static | escapeArray ( $array)
static | updateObjectList ( $parameters)
static | getShortAttributeName ( $db, $def, $attrName)

## Public Attributes
const | SORT_FIELD_PATH = 1
const | SORT_FIELD_PUBLISHED = 2
const | SORT_FIELD_MODIFIED = 3
const | SORT_FIELD_SECTION = 4
const | SORT_FIELD_DEPTH = 5
const | SORT_FIELD_CLASS_IDENTIFIER = 6
const | SORT_FIELD_CLASS_NAME = 7
const | SORT_FIELD_PRIORITY = 8
const | SORT_FIELD_NAME = 9
const | SORT_FIELD_MODIFIED_SUBNODE = 10
const | SORT_FIELD_NODE_ID = 11
const | SORT_FIELD_CONTENTOBJECT_ID = 12
const | SORT_FIELD_VISIBILITY = 13
const | SORT_ORDER_DESC = 0
const | SORT_ORDER_ASC = 1
| $CurrentLanguage = false
| $Name
| $ClassIdentifier = null
| $ClassName = null
| $ContentObject
| $Permissions
Public Attributes inherited from eZPersistentObject
| $PersistentDataDirty
| $ID
| $ContentObjectID
| $SectionID
| $OwnerID
| $ClassID
| $Published
| $Modified
| $CurrentVersion
| $Status
| $RemoteID
| $LanguageMask
| $InitialLanguageID
| $NodeID
| $ParentNodeID
| $MainNodeID
| $ContentObjectVersion
| $ContentObjectIsPublished
| $Depth
| $SortField
| $SortOrder
| $Priority
| $ModifiedSubNode
| $PathString
| $PathIdentificationString
| $IsHidden
| $IsInvisible
| $UserID
| $Name
| $Locale
| $Identifier
| $NavigationPartIdentifier
| $SerializedDescriptionList
| $URLAliasName
| $AlwaysAvailable
| $CanTranslate
| $DataInt1
| $DataInt2
| $DataInt3
| $DataInt4
| $DataFloat1
| $DataFloat2
| $DataFloat3
| $DataFloat4
| $DataText1
| $DataText2
| $DataText3
| $DataText4
| $DataText5
| $SerializedDataText
| $Category
| $PolicyID
| $Values
| $Created
| $CurrencyCode
| $ProductCollectionID
| $ItemCount
| $Price
| $IsVATIncluded
| $VATValue
| $DiscountValue
| $Email
| $IsTemporary
| $IsArchived
| $IsActive
| $OrderID
| $ModifierID
| $Code
| $Symbol
| $AutoRateValue
| $CustomRateValue
| $RateFactor
| $Main
| $MementoKey
| $MainKey
| $WorkflowEventPos
| $LanguageID
| $ContentObjectStateGroupID
| $contentobject_attribute_id
| $contentobject_id
| $rating
| $rating_count
| $rating_average

## Protected Member Functions
| hasCurrentSubtreeLimitation (array $policy)

## Protected Attributes
| $ClassIsContainer = null

## Static Protected Attributes
static | $useCurrentUserDraft = false

## Private Member Functions
| updatePathIdentificationString ( $pathIdentificationName)

## Static Private Member Functions
static | reverseRelatedCount ( $nodeIDArray)

## Additional Inherited Members
Static Protected Member Functions inherited from eZPersistentObject
static | replaceFieldsWithLongNames (eZDBInterface $db, array $fieldDefs, &$fields)

## Detailed Description

Definition at line 16 of file ezcontentobjecttreenode.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZContentObjectTreeNode::__construct | ( |  | $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 |

Reimplemented from eZPersistentObject.

Definition at line 35 of file ezcontentobjecttreenode.php.

Referenced by eZContentObjectTreeNode().

## Member Function Documentation

## ◆ addChild()

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

Add a child for this node to the object tree.

Parameters

  $contentobjectID | The ID of the contentobject the child-node should point to.
  $asObject | If true it will return the new child-node as an object, if not it returns the ID.
  $contentObjectVersion | The version to use on the newly created child-node, if false it uses the current_version of the specified object.

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

Definition at line 3309 of file ezcontentobjecttreenode.php.

References addChildTo(), and eZPersistentObject\attribute().

## ◆ addChildTo()

static eZContentObjectTreeNode::addChildTo | ( |  | $contentobjectID,
|  |  | $nodeID,
|  |  | $asObject = `false`,
|  |  | $contentObjectVersion = `false`
| ) |  |
| static

Add a child to the object tree.

Parameters

  $contentobjectID | The ID of the contentobject the child-node should point to.
  $nodeID | The ID of the parent-node to add child-node to.
  $asObject | If true it will return the new child-node as an object, if not it returns the ID.
  $contentObjectVersion | The version to use on the newly created child-node, if false it uses the current_version of the specified object.

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

Definition at line 3324 of file ezcontentobjecttreenode.php.

References create(), eZContentObject\fetch(), fetch(), and eZDB\instance().

Referenced by addChild(), and eZContentObject\addLocation().

## ◆ adjustPathElement()

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

  $element | The desired url element name
  $useParentFromNodeObject | Use 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

Definition at line 3477 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), eZPersistentObject\count(), eZURLAliasML\fetchByAction(), and eZURLAliasML\findUniqueText().

Referenced by checkPath(), and updateSubTreePath().

## ◆ assignSectionToSubTree()

static eZContentObjectTreeNode::assignSectionToSubTree | ( |  | $nodeID,
|  |  | $sectionID,
|  |  | $oldSectionID = `false`,
|  |  | $updateSearchIndexes = `true`
| ) |  |
| 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.

Definition at line 2828 of file ezcontentobjecttreenode.php.

References eZContentObject\clearCache(), fetch(), eZSection\fetch(), getObjectIdsInNodeSubTree(), eZDB\instance(), eZSearch\updateObjectsSection(), and eZAudit\writeAudit().

Referenced by eZContentObjectTreeNodeOperations\move(), eZSiteInstaller\setSection(), eZSiteInstaller\swapNodes(), and updateMainNodeID().

## ◆ availableClassesJsArray()

eZContentObjectTreeNode::availableClassesJsArray | ( |  | ) |

Returns available classes as Js array. Checks if the node is container, if yes emptyStr will be returned.

Returns
  string

Definition at line 6261 of file ezcontentobjecttreenode.php.

References availableClassListJsArray().

## ◆ availableClassListJsArray()

static eZContentObjectTreeNode::availableClassListJsArray | ( |  | $parameters = `false` | ) |
| static

Returns available classes as Js array. Checks for ini settings.

Parameters

  array | bool | $parameters |

Returns
  string

Definition at line 6273 of file ezcontentobjecttreenode.php.

References fetch(), eZContentClass\fetchAllClasses(), and getClassesJsArray().

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

## ◆ calendar()

static eZContentObjectTreeNode::calendar | ( |  | $params = `false`,
|  |  | $nodeID = `0`
| ) |  |
| static

Returns
  The date/time list when object were published

Definition at line 2552 of file ezcontentobjecttreenode.php.

References eZPersistentObject\count(), createAttributeFilterSQLStrings(), createClassFilteringSQLString(), createExtendedAttributeFilterSQLStrings(), createGroupBySQLStrings(), createMainNodeConditionSQLString(), createPathConditionAndNotEqParentSQLStrings(), createPermissionCheckingSQL(), createShowInvisibleSQLString(), getLimitationList(), eZDB\instance(), eZDBInterface\SERVER_SLAVE, eZContentLanguage\sqlFilter(), and eZDebug\writeError().

## ◆ canAddLocation()

eZContentObjectTreeNode::canAddLocation | ( |  | ) |

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

Returns
  bool

Definition at line 463 of file ezcontentobjecttreenode.php.

References checkAccess().

## ◆ canCreate()

eZContentObjectTreeNode::canCreate | ( |  | ) |

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

Returns
  bool

Definition at line 392 of file ezcontentobjecttreenode.php.

References checkAccess().

## ◆ canCreateClassList()

eZContentObjectTreeNode::canCreateClassList | ( |  | $asObject = `false`,
|  |  | $includeFilter = `true`,
|  |  | $groupList = `false`,
|  |  | $fetchID = `false`
| ) |  |

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

Parameters

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

Definition at line 5077 of file ezcontentobjecttreenode.php.

References classListFromPolicy(), eZPersistentObject\count(), eZUser\currentUser(), eZContentLanguage\fetchLocaleList(), eZPersistentObject\handleRows(), hasCurrentSubtreeLimitation(), eZDB\instance(), eZContentClassName\sqlFilter(), eZContentClass\VERSION_STATUS_DEFINED, and eZDebugSetting\writeDebug().

## ◆ canEdit()

eZContentObjectTreeNode::canEdit | ( |  | ) |

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

Returns
  bool

Definition at line 352 of file ezcontentobjecttreenode.php.

References checkAccess(), and eZUser\currentUser().

## ◆ canHide()

eZContentObjectTreeNode::canHide | ( |  | ) |

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

Returns
  bool

Definition at line 378 of file ezcontentobjecttreenode.php.

References checkAccess().

## ◆ canMoveFrom()

eZContentObjectTreeNode::canMoveFrom | ( |  | ) |

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

Returns
  bool

Definition at line 420 of file ezcontentobjecttreenode.php.

References checkAccess().

## ◆ canMoveTo()

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

Definition at line 435 of file ezcontentobjecttreenode.php.

References checkAccess().

## ◆ canPdf()

eZContentObjectTreeNode::canPdf | ( |  | ) |

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

Returns
  bool

Definition at line 324 of file ezcontentobjecttreenode.php.

References checkAccess().

## ◆ canRead()

eZContentObjectTreeNode::canRead | ( |  | ) |

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

Returns
  bool

Definition at line 310 of file ezcontentobjecttreenode.php.

References checkAccess().

Referenced by eZNodeviewfunctions\contentViewGenerate().

## ◆ canRemove()

eZContentObjectTreeNode::canRemove | ( |  | ) |

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

Returns
  bool

Definition at line 406 of file ezcontentobjecttreenode.php.

References checkAccess().

## ◆ canRemoveLocation()

eZContentObjectTreeNode::canRemoveLocation | ( |  | ) |

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

Returns
  bool

Definition at line 477 of file ezcontentobjecttreenode.php.

References checkAccess().

## ◆ canSwap()

eZContentObjectTreeNode::canSwap | ( |  | ) |

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

Returns
  bool

Definition at line 449 of file ezcontentobjecttreenode.php.

References checkAccess().

## ◆ canViewEmbed()

eZContentObjectTreeNode::canViewEmbed | ( |  | ) |

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

Returns
  bool

Definition at line 338 of file ezcontentobjecttreenode.php.

References checkAccess().

## ◆ checkAccess()

eZContentObjectTreeNode::checkAccess | ( |  | $functionName,
|  |  | $originalClassID = `false`,
|  |  | $parentClassID = `false`,
|  |  | $returnAccessList = `false`,
|  |  | $language = `false`
| ) |  |

Definition at line 4358 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), eZPersistentObject\count(), eZUser\currentUser(), fetch(), eZNodeAssignment\fetchForObject(), eZContentLanguage\idByLocale(), eZContentLanguage\maskByLocale(), unserialize(), eZPreferences\value(), and eZDebug\writeError().

Referenced by canAddLocation(), canCreate(), canEdit(), canHide(), canMoveFrom(), canMoveTo(), canPdf(), canRead(), canRemove(), canRemoveLocation(), canSwap(), canViewEmbed(), and eZNodeviewfunctions\contentViewGenerate().

## ◆ checkPath()

eZContentObjectTreeNode::checkPath | ( |  | $path | ) |

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

Definition at line 3453 of file ezcontentobjecttreenode.php.

References adjustPathElement(), and eZURLAliasML\cleanURL().

Referenced by pathWithNames().

## ◆ children()

eZContentObjectTreeNode::children | ( |  | ) |

Returns the first level children in sorted order.

Returns
  array|null

Definition at line 2691 of file ezcontentobjecttreenode.php.

References sortArray(), and subTree().

## ◆ childrenByName()

eZContentObjectTreeNode::childrenByName | ( |  | $name | ) |

Returns
  the children(s) of the current node as an array of eZContentObjectTreeNode objects

Definition at line 2660 of file ezcontentobjecttreenode.php.

References eZDB\instance(), and makeObjectsArray().

## ◆ childrenCount()

eZContentObjectTreeNode::childrenCount | ( |  | $checkPolicies = `true` | ) |

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

Definition at line 2703 of file ezcontentobjecttreenode.php.

References subTreeCount().

## ◆ classAttributeIDByIdentifier()

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

Definition at line 288 of file ezcontentobjecttreenode.php.

References eZContentClassAttribute\classAttributeIDByIdentifier().

Referenced by createAttributeFilterSQLStrings(), and createSortingSQLStrings().

## ◆ classIDByIdentifier()

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

Definition at line 300 of file ezcontentobjecttreenode.php.

References eZContentClass\classIDByIdentifier().

## ◆ classIdentifier()

eZContentObjectTreeNode::classIdentifier | ( |  | ) |

Returns the node's class identifier

Returns
  string|bool|string|null

Definition at line 5887 of file ezcontentobjecttreenode.php.

References $ClassIdentifier, and object().

## ◆ classIsContainer()

eZContentObjectTreeNode::classIsContainer | ( |  | ) |

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

Returns
  int|null

Definition at line 5920 of file ezcontentobjecttreenode.php.

References $ClassIsContainer, and object().

## ◆ classListFromPolicy()

eZContentObjectTreeNode::classListFromPolicy | ( |  | $policy,
|  |  | $allowedLanguageCodes = `false`
| ) |  |

Definition at line 4826 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), eZUser\currentUser(), fetch(), unserialize(), and eZPreferences\value().

Referenced by canCreateClassList().

## ◆ className()

eZContentObjectTreeNode::className | ( |  | ) |

Returns the node's class name

Returns
  string|null

Definition at line 5903 of file ezcontentobjecttreenode.php.

References $ClassName, and object().

## ◆ clearViewCacheForSubtree()

static eZContentObjectTreeNode::clearViewCacheForSubtree | ( | eZContentObjectTreeNode | $node,
|  |  | $clearForRootNode = `true`
| ) |  |
| static

Clears the view cache for a subtree

Parameters

  eZContentObjectTreeNode | $node |
  bool | $clearForRootNode |

Returns
  bool

Definition at line 6161 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), eZContentCacheManager\clearContentCacheIfNeeded(), eZPersistentObject\count(), subTree(), and subTreeCount().

Referenced by hideSubTree(), and unhideSubTree().

## ◆ contentObjectVersionObject()

eZContentObjectTreeNode::contentObjectVersionObject | ( |  | $asObject = `true` | ) |

Returns the eZContentObjectVersionObject of the current node

Parameters

  bool | $asObject |

Returns
  eZContentObjectVersion|array|bool

Definition at line 5815 of file ezcontentobjecttreenode.php.

References $CurrentLanguage, and eZContentObjectVersion\fetchVersion().

## ◆ create()

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 | $parentNodeID | The ID of the parent or null if the node is not known yet.
  int | $contentObjectID | The ID of the object it points to or null if it is not known yet.
  int | $contentObjectVersion | The version of the object or 0 if not known yet.
  int | $sortField | Number describing the field to sort by, or 0 if not known yet.
  bool | $sortOrder | Which way to sort, true means ascending while false is descending.

Returns
  eZContentObjectTreeNode

Definition at line 182 of file ezcontentobjecttreenode.php.

References eZContentObjectTreeNode(), and eZRemoteIdUtility\generate().

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

## ◆ createAttributeFilterSQLStrings()

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

Definition at line 973 of file ezcontentobjecttreenode.php.

References classAttributeIDByIdentifier(), eZContentLanguage\clearPrioritizedLanguages(), eZPersistentObject\count(), eZDB\instance(), eZContentLanguage\setPrioritizedLanguages(), sortKeyByClassAttributeID(), eZContentLanguage\sqlFilter(), eZContentClassName\sqlFilter(), eZDebug\writeError(), and eZDebug\writeNotice().

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

## ◆ createClassFilteringSQLString()

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

Definition at line 795 of file ezcontentobjecttreenode.php.

References eZContentClass\classIDByIdentifier(), eZPersistentObject\count(), and eZDebugSetting\writeWarning().

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

## ◆ createExtendedAttributeFilterSQLStrings()

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

Definition at line 857 of file ezcontentobjecttreenode.php.

References eZExtension\baseDirectory(), eZPersistentObject\count(), and eZDebug\writeError().

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

## ◆ createGroupBySQLStrings()

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

static

Definition at line 1575 of file ezcontentobjecttreenode.php.

References subTreeGroupByDateField().

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

## ◆ createMainNodeConditionSQLString()

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

Definition at line 922 of file ezcontentobjecttreenode.php.

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

## ◆ createNodesConditionSQLStringFromPath()

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

static

Parameters

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

Definition at line 1820 of file ezcontentobjecttreenode.php.

References eZPersistentObject\count(), and eZDB\instance().

Referenced by fetchNodesByPathString().

## ◆ createNotEqParentSQLString()

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

Definition at line 1391 of file ezcontentobjecttreenode.php.

Referenced by createPathConditionAndNotEqParentSQLStrings().

## ◆ createObjectNameFilterConditionSQLString()

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

Definition at line 945 of file ezcontentobjecttreenode.php.

References eZAlphabetOperator\fetchAlphabet(), and eZDB\instance().

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

## ◆ createPathConditionAndNotEqParentSQLStrings()

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

Definition at line 1462 of file ezcontentobjecttreenode.php.

References eZPersistentObject\count(), createNotEqParentSQLString(), createPathConditionSQLString(), fetch(), and eZDB\instance().

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

## ◆ createPathConditionSQLString()

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

Definition at line 1411 of file ezcontentobjecttreenode.php.

Referenced by createPathConditionAndNotEqParentSQLStrings().

## ◆ createPermissionCheckingSQL()

static eZContentObjectTreeNode::createPermissionCheckingSQL | ( |  | $limitationList,
|  |  | $treeTableName = `'ezcontentobject_tree'`,
|  |  | $tableAliasName = `'ezcontentobject_tree'`
| ) |  |
| static

static

Definition at line 1662 of file ezcontentobjecttreenode.php.

References eZPersistentObject\count(), eZUser\currentUser(), eZDB\instance(), and eZDBInterface\SERVER_SLAVE.

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

## ◆ createShowInvisibleSQLString()

static eZContentObjectTreeNode::createShowInvisibleSQLString | ( |  | $useSettings,
|  |  | $fetchHidden = `true`
| ) |  |
| static

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

Definition at line 1859 of file ezcontentobjecttreenode.php.

References showInvisibleNodes().

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

## ◆ createSortingSQLStrings()

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

Definition at line 560 of file ezcontentobjecttreenode.php.

References classAttributeIDByIdentifier(), eZPersistentObject\count(), eZDataType\create(), dataTypeByClassAttributeID(), sortKeyByClassAttributeID(), eZContentLanguage\sqlFilter(), eZContentClassName\sqlFilter(), eZDebug\writeError(), and eZDebug\writeWarning().

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

## ◆ createVersionNameJoinsSQLString()

static eZContentObjectTreeNode::createVersionNameJoinsSQLString | ( |  | $useVersionName,
|  |  | $includeAnd = `true`,
|  |  | $onlyTranslated = `false`,
|  |  | $lang = `false`,
|  |  | $treeTableName = `'ezcontentobject_tree'`
| ) |  |
| static

Deprecated:
  Since 5.0

Definition at line 1641 of file ezcontentobjecttreenode.php.

References eZContentLanguage\sqlFilter(), and eZDebug\writeStrict().

## ◆ createVersionNameTablesSQLString()

static eZContentObjectTreeNode::createVersionNameTablesSQLString | ( |  | $useVersionName | ) |
| static

Deprecated:
  Since 5.0

Definition at line 1607 of file ezcontentobjecttreenode.php.

References eZDebug\writeStrict().

## ◆ createVersionNameTargetsSQLString()

static eZContentObjectTreeNode::createVersionNameTargetsSQLString | ( |  | $useVersionName | ) |
| static

Deprecated:
  Since 5.0

Definition at line 1624 of file ezcontentobjecttreenode.php.

References eZDebug\writeStrict().

## ◆ creator()

eZContentObjectTreeNode::creator | ( |  | ) |

Returns the creator of the version published in the node.

Returns
  eZContentObject

Definition at line 5796 of file ezcontentobjecttreenode.php.

References eZContentObject\fetch(), and eZDB\instance().

## ◆ currentLanguage()

eZContentObjectTreeNode::currentLanguage | ( |  | ) |

Returns the node's current language

Returns
  string

Definition at line 6216 of file ezcontentobjecttreenode.php.

References $CurrentLanguage.

Referenced by eZNodeviewfunctions\generateNodeViewData().

## ◆ dataMap()

eZContentObjectTreeNode::dataMap | ( |  | ) |

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

See also
  eZContentObject::fetchDataMap()

Returns
  eZContentObjectAttribute[]

Definition at line 231 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), eZUser\currentUserID(), eZContentObjectVersion\fetchLatestUserDraft(), and object().

## ◆ dataTypeByClassAttributeID()

static eZContentObjectTreeNode::dataTypeByClassAttributeID | ( |  | $classAttributeID | ) |
| static

Returns the datatype of a class attribute

Parameters

  int | $classAttributeID |

Returns
  string

Definition at line 503 of file ezcontentobjecttreenode.php.

References eZContentClassAttribute\dataTypeByID().

Referenced by createSortingSQLStrings().

## ◆ definition()

static eZContentObjectTreeNode::definition | ( |  | ) |
| static

Returns the definition for the object, the default implementation is to return an empty array. It's upto each inheriting class to return a proper definition array.The definition array is an associative array consists of these keys:

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

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

Returns
  array

Reimplemented from eZPersistentObject.

Reimplemented in eZContentObjectTrashNode.

Definition at line 52 of file ezcontentobjecttreenode.php.

Referenced by fetchByContentObjectID().

## ◆ deleteNodeWhereParent()

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.

Definition at line 5415 of file ezcontentobjecttreenode.php.

References findNode(), and removeNode().

## ◆ eZContentObjectTreeNode()

eZContentObjectTreeNode::eZContentObjectTreeNode | ( |  | $row = `array()` | ) |

Deprecated:
  Use eZContentObjectTreeNode::__construct() instead

Parameters

  int | array | $row |

Definition at line 44 of file ezcontentobjecttreenode.php.

References __construct().

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

## ◆ fetch()

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

Fetches a node by ID

Parameters

  int | array | bool | $nodeID | Either a node ID or array of node IDs
  string | bool | $lang | language code to fetch the node in. If not provided, the prioritized language list is used
  bool | $asObject | True to fetch the node as an eZContentObjectTreeNode, false to fetch its attributes as an array
  array | bool | $conditions | An associative array (field => value) of fetch conditions. Will be applied as is to the SQL query

Returns
  eZContentObjectTreeNode

Definition at line 3058 of file ezcontentobjecttreenode.php.

References eZPersistentObject\count(), eZDB\instance(), makeObjectsArray(), eZContentLanguage\sqlFilter(), and eZDebug\writeWarning().

Referenced by eZContentObjectPackageHandler\add(), addChildTo(), eZPolicyLimitation\allValuesAsArrayWithNames(), assignSectionToSubTree(), eZRole\assignToUser(), availableClassListJsArray(), eZContentObject\checkAccess(), checkAccess(), eZContentObjectVersion\checkAccess(), eZContentUpload\checkAccess(), eZContentObject\classListFromPolicy(), classListFromPolicy(), eZSubtreeCache\cleanupByNodeIDs(), eZNodeviewfunctions\contentViewGenerate(), eZContentObjectTreeNodeOperations\copy(), eZContentObjectTreeNodeOperations\copyPublishContentObject(), eZContentObjectTreeNodeOperations\copySubtree(), eZContentFunctions\createAndPublishObject(), eZObjectRelationListType\createNewObject(), createPathConditionAndNotEqParentSQLStrings(), eZRSSImport\destinationPath(), eZSimplifiedXMLEditOutput\eznodeHref(), fetchByPath(), fetchByRemoteID(), fetchByURLPath(), eZContentBrowseBookmark\fetchNode(), eZContentBrowseRecent\fetchNode(), eZSubtreeNotificationRule\fetchNodesForUserID(), fetchParent(), findMainNode(), eZContentObjectPackageHandler\generateFetchAliasArray(), eZContentCacheManager\generateObjectViewCache(), eZContentObjectPackageHandler\generatePackage(), eZContentObjectPackageCreator\generatePackageInformation(), eZRSSExportItem\getAttributeMappings(), eZNodeAssignment\getParentNode(), eZLDAPUser\goAndPublishGroups(), eZContentObjectPackageHandler\handleParameters(), eZHTTPHeader\headerOverrideArray(), eZRSSExport\imageNode(), eZRSSExport\imagePath(), eZContentStructureTreeOperator\initContentStructureTree(), eZObjectRelationListType\initializeObjectAttribute(), eZContentObjectPackageInstaller\initializeTopNodes(), eZTopMenuOperator\modify(), eZTreeMenuOperator\modify(), move(), eZContentObjectTreeNodeOperations\move(), eZWorkflowProcess\node(), eZSubtreeNotificationRule\node(), eZContentUpload\nodeAliasID(), eZContentObjectAssignmentHandler\nodeID(), eZContentObjectTrashNode\originalParent(), eZContentObject\parentNodes(), eZXMLOutputHandler\prefetch(), eZSimplifiedXMLInputParser\publishHandlerEmbed(), eZSimplifiedXMLInputParser\publishHandlerLink(), removeNode(), removeSubtrees(), eZContentObject\removeThis(), reverseRelatedCount(), eZContentObjectAssignmentHandler\setupAssignments(), eZPDFExport\sourceNode(), eZRSSExportItem\sourceNode(), eZRSSExportItem\sourcePath(), eZContentStructureTreeOperator\subTree(), eZSiteInstaller\swapNodes(), and eZXMLTextType\transformLinksToRemoteLinks().

## ◆ fetchAliasesFromNodeList()

static eZContentObjectTreeNode::fetchAliasesFromNodeList | ( |  | $nodeList | ) |
| static

Fetches path_identification_string for a list of nodes

Parameters

  array(int) | $nodeList

Returns
  array Associative array

Definition at line 2961 of file ezcontentobjecttreenode.php.

References eZPersistentObject\count(), and eZDB\instance().

## ◆ fetchByContentObjectID()

static eZContentObjectTreeNode::fetchByContentObjectID | ( |  | $contentObjectID,
|  |  | $asObject = `true`,
|  |  | $contentObjectVersion = `false`
| ) |  |
| static

Reimplemented in eZContentObjectTrashNode.

Definition at line 2918 of file ezcontentobjecttreenode.php.

References definition(), and eZPersistentObject\fetchObjectList().

Referenced by eZWishList\discountPercent(), eZRole\fetchByUser(), eZLDAPUser\publishNewUserGroup(), eZContentObjectVersion\serialize(), and eZContentObject\setAlwaysAvailableLanguageID().

## ◆ fetchByCRC()

eZContentObjectTreeNode::fetchByCRC | ( |  | $pathStr | ) |

Definition at line 2912 of file ezcontentobjecttreenode.php.

References eZDebug\writeWarning().

## ◆ fetchByPath()

static eZContentObjectTreeNode::fetchByPath | ( |  | $pathString,
|  |  | $asObject = `true`
| ) |  |
| static

Definition at line 2938 of file ezcontentobjecttreenode.php.

References fetch().

Referenced by eZPolicyLimitation\allValuesAsArrayWithNames().

## ◆ fetchByRemoteID()

static eZContentObjectTreeNode::fetchByRemoteID | ( |  | $remoteID,
|  |  | $asObject = `true`
| ) |  |
| static

Definition at line 2933 of file ezcontentobjecttreenode.php.

References fetch().

Referenced by eZContentObjectPackageHandler\installFetchAliases(), eZContentObjectPackageHandler\installOverrides(), eZContentObjectPackageHandler\installSuspendedNodeAssignment(), eZXMLTextType\transformRemoteLinksToLinks(), and unserialize().

## ◆ fetchByURLPath()

static eZContentObjectTreeNode::fetchByURLPath | ( |  | $pathString,
|  |  | $asObject = `true`
| ) |  |
| static

Definition at line 2943 of file ezcontentobjecttreenode.php.

References fetch(), and eZDebug\writeWarning().

Referenced by eZStaticCache\generateNodeListCache(), eZContentObjectPackageHandler\handleParameters(), eZContentUpload\nodeAliasID(), eZSiteInstaller\nodeByUrl(), eZSimplifiedXMLInputParser\publishHandlerEmbed(), and eZSimplifiedXMLInputParser\publishHandlerLink().

## ◆ fetchClassIdentifierListByPathString()

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

  $nodePath | A string containing the path of the node, it consists of node IDs starting from the root and delimited by / (slash).
  $withLastNode | If `true` the last node in the path is included in the list. The last node is the node which the path was fetched from.
  $limit | maximum number of nodes in the path to use, starting from last node

Returns
  An array with class identifier and node ID.

Example

$list = fetchClassIdentifierListByPathString( '/2/10/', false );
eZContentObjectTreeNode\fetchClassIdentifierListByPathString
static fetchClassIdentifierListByPathString( $nodePath, $withLastNode, $limit=false)
Definition: ezcontentobjecttreenode.php:3286

Definition at line 3286 of file ezcontentobjecttreenode.php.

References fetchNodesByPathString().

Referenced by eZContentCacheManager\nodeListForObject().

## ◆ fetchList()

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

Definition at line 529 of file ezcontentobjecttreenode.php.

References eZContentObjectTreeNode(), and eZDB\instance().

## ◆ fetchListCount()

static eZContentObjectTreeNode::fetchListCount | ( |  | ) |
| static

Fetches the number of nodes which exists in the system.

Returns
  int

Definition at line 513 of file ezcontentobjecttreenode.php.

References eZDB\instance().

## ◆ fetchNode()

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.

Definition at line 3172 of file ezcontentobjecttreenode.php.

References eZPersistentObject\count(), eZDB\instance(), eZContentLanguage\languagesSQLFilter(), and makeObjectsArray().

Referenced by eZNodeAssignment\fetchNode(), eZContentObjectTreeNodeOperations\move(), and eZLDAPUser\publishUpdateUser().

## ◆ fetchNodesByPathString()

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

  $withLastNode | If `true` the last node in the path is included in the list. The last node is the node which the path was fetched from.
  $asObjects | If `true` then return PHP objects, if not return raw row data.
  $limit | maximum number of nodes in the path to use, starting from last node

Definition at line 3236 of file ezcontentobjecttreenode.php.

References createNodesConditionSQLStringFromPath(), eZDB\instance(), makeObjectsArray(), and eZContentLanguage\sqlFilter().

Referenced by fetchClassIdentifierListByPathString(), and fetchPath().

## ◆ fetchParent()

eZContentObjectTreeNode::fetchParent | ( |  | ) |

Definition at line 3202 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), and fetch().

Referenced by removeThis(), updatePathIdentificationString(), and updateSubTreePath().

## ◆ fetchPath()

eZContentObjectTreeNode::fetchPath | ( |  | ) |

Definition at line 3221 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), and fetchNodesByPathString().

## ◆ findMainNode()

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

Definition at line 2981 of file ezcontentobjecttreenode.php.

References eZPersistentObject\count(), fetch(), eZDB\instance(), and eZDebug\writeError().

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

## ◆ findMainNodeArray()

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 | $asObject | Wether to return the result as an array of eZContentObjectTreeNode (true) or as an array of associative arrays (false)

Returns
  array(array|eZContentObjectTreeNode)

Definition at line 3018 of file ezcontentobjecttreenode.php.

References eZDB\instance(), and makeObjectsArray().

Referenced by eZKeyword\relatedObjects().

## ◆ findNode()

static eZContentObjectTreeNode::findNode | ( |  | $parentNode,
|  |  | $id,
|  |  | $asObject = `false`,
|  |  | $remoteID = `false`
| ) |  |
| static

Definition at line 5421 of file ezcontentobjecttreenode.php.

References eZDB\instance(), and makeObjectsArray().

Referenced by deleteNodeWhereParent().

## ◆ getClassesJsArray()

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

Definition at line 6369 of file ezcontentobjecttreenode.php.

References eZContentClass\canInstantiateClassList(), and eZContentObjectTreeNode().

Referenced by availableClassListJsArray().

## ◆ getLimitationList()

static eZContentObjectTreeNode::getLimitationList | ( | & | $limitation | ) |
| static

static

Definition at line 1895 of file ezcontentobjecttreenode.php.

References eZUser\currentUser(), and eZDebugSetting\writeDebug().

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

## ◆ getName()

eZContentObjectTreeNode::getName | ( |  | $language = `false` | ) |

Definition at line 5494 of file ezcontentobjecttreenode.php.

References $Name, eZPersistentObject\attribute(), eZPersistentObject\count(), and eZDB\instance().

## ◆ getObjectIdsInNodeSubTree()

static eZContentObjectTreeNode::getObjectIdsInNodeSubTree | ( |  | $node | ) |
| static

Returns an array of Object IDs inside node subtree or null when empty.

Parameters

  $node |

Returns
  array|null

Definition at line 6446 of file ezcontentobjecttreenode.php.

References eZPersistentObject\count(), and eZDB\instance().

Referenced by eZSection\applyTo(), and assignSectionToSubTree().

## ◆ getParentNodeId()

static eZContentObjectTreeNode::getParentNodeId | ( |  | $nodeID | ) |
| static

Get parent node id by node id

Parameters

  $nodeID | the node id you want parent node id for.

Definition at line 5342 of file ezcontentobjecttreenode.php.

References eZDB\instance().

## ◆ getParentNodeIdListByContentObjectID()

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 | $groupByObjectId | groups parent node ids by object id they belong to.
  bool | $onlyMainNode | limits result to parent node id of main node.

Returns
  array Returns array of parent node id's

Definition at line 5368 of file ezcontentobjecttreenode.php.

References eZDB\instance().

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

## ◆ hasContentObject()

eZContentObjectTreeNode::hasContentObject | ( |  | ) |

Checks if the node's contentobject has already loaded

Returns
  bool

Definition at line 5773 of file ezcontentobjecttreenode.php.

Referenced by object(), and setCurrentLanguage().

## ◆ hasCurrentSubtreeLimitation()

eZContentObjectTreeNode::hasCurrentSubtreeLimitation | ( | array | $policy | ) |
| protected

Checks if provided policy array has a limitation on current subtree

Parameters

  array | $policy |

Returns
  bool

Definition at line 5029 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute().

Referenced by canCreateClassList().

## ◆ hiddenInvisibleString()

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

Definition at line 5937 of file ezcontentobjecttreenode.php.

## ◆ hiddenStatusString()

eZContentObjectTreeNode::hiddenStatusString | ( |  | ) |

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

Returns
  string

Definition at line 5948 of file ezcontentobjecttreenode.php.

References ezpI18n\tr().

## ◆ hideSubTree()

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 | $node | Root node of the subtree
  bool | $modifyRootNode | Whether to modify the root node (true/false)

Definition at line 5985 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), clearViewCacheForSubtree(), eZDB\instance(), eZAudit\isAuditEnabled(), updateAndStoreModified(), and eZAudit\writeAudit().

Referenced by updateNodeVisibility().

## ◆ isMain()

eZContentObjectTreeNode::isMain | ( |  | ) |

Returns true if this node is the main node.

Returns
  bool

Definition at line 276 of file ezcontentobjecttreenode.php.

References eZPersistentObject\$MainNodeID.

Referenced by eZNodeviewfunctions\generateNodeViewData().

## ◆ isNodeTrashAllowed()

eZContentObjectTreeNode::isNodeTrashAllowed | ( |  | ) |

Figure out if a node can be sent to trash or if it should be directly deleted as objects containing ezuser attributes can not be sent to trash.

Returns
  bool true if it can go to trash, false if it should be deleted

Definition at line 6416 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), eZUser\contentClassIDs(), and subTreeCount().

## ◆ makeObjectsArray()

static eZContentObjectTreeNode::makeObjectsArray | ( |  | $array,
|  |  | $with_contentobject = `true`,
|  | array|null | $propertiesOverride = `null`,
|  |  | $lang = `null`
| ) |  |
| static

Definition at line 5227 of file ezcontentobjecttreenode.php.

References eZContentObjectTreeNode(), eZContentClass\nameFromSerializedString(), and ezpI18n\tr().

Referenced by eZContentObject\assignedNodes(), childrenByName(), fetch(), fetchNode(), fetchNodesByPathString(), findMainNodeArray(), findNode(), subTreeByNodeID(), and subTreeMultiPaths().

## ◆ move()

eZContentObjectTreeNode::move | ( |  | $newParentNodeID,
|  |  | $nodeID = `0`
| ) |  |

Moves the node to the given node.

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

role system clean up

Definition at line 4240 of file ezcontentobjecttreenode.php.

References eZPersistentObject\count(), eZRole\expireCache(), fetch(), eZPolicyLimitation\findByType(), eZDB\instance(), updateNodeVisibility(), and eZAudit\writeAudit().

## ◆ object()

eZContentObjectTreeNode::object | ( |  | ) |

Returns the eZContentObject associated to this node

Returns
  eZContentObject

Definition at line 5752 of file ezcontentobjecttreenode.php.

References $ContentObject, eZPersistentObject\$contentobject_id, eZPersistentObject\attribute(), eZContentObject\fetch(), and hasContentObject().

Referenced by classIdentifier(), classIsContainer(), className(), dataMap(), removeNodeFromTree(), removeThis(), and updateSubTreePath().

## ◆ parentDepthLimitationList()

static eZContentObjectTreeNode::parentDepthLimitationList | ( |  | ) |
| static

Returns
  array

Definition at line 6239 of file ezcontentobjecttreenode.php.

## ◆ pathArray()

eZContentObjectTreeNode::pathArray | ( |  | ) |

Definition at line 3207 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute().

Referenced by eZContentObjectTrashNode\originalParent(), and pathWithNames().

## ◆ pathWithNames()

eZContentObjectTreeNode::pathWithNames | ( |  | $regenerateCurrent = `false` | ) |

Returns
  an url alias for the current node. It will generate a unique alias.

Definition at line 3382 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), checkPath(), eZURLAliasML\convertToAlias(), eZPersistentObject\count(), eZURLAliasML\fetchPathByActionList(), pathArray(), and eZDebug\writeError().

Referenced by urlAlias().

## ◆ remoteID()

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

Definition at line 258 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), eZRemoteIdUtility\generate(), eZPersistentObject\setAttribute(), and eZPersistentObject\sync().

## ◆ removeNode()

static eZContentObjectTreeNode::removeNode | ( |  | $nodeID = `0` | ) |
| static

See also
  removeThis

Definition at line 3689 of file ezcontentobjecttreenode.php.

References fetch().

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

## ◆ removeNodeFromTree()

eZContentObjectTreeNode::removeNodeFromTree | ( |  | $moveToTrash = `true` | ) |

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

Parameters

  $moveToTrash | If `true` it will move the object to trash, if `false` the object will be purged from the system.

Note
  This uses remove() to do the actual node removal but has some extra logic
  Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 4098 of file ezcontentobjecttreenode.php.

References eZSearch\addObject(), eZPersistentObject\attribute(), eZPersistentObject\count(), eZContentObjectTrashNode\createFromNode(), eZDB\instance(), object(), removeThis(), and updateMainNodeID().

## ◆ removeSubtrees()

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

  $moveToTrash | If `true` it will move the object to trash, if `false` the object will be purged from the system.
  $infoOnly | If set to `true` then it will not remove the subtree but instead return information on what will happen if it is removed. See subtreeRemovalInformation() for the returned structure.

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

Definition at line 3847 of file ezcontentobjecttreenode.php.

References eZContentObject\clearCache(), eZPersistentObject\count(), eZUser\currentUser(), fetch(), eZNodeAssignment\fetchChildCountByVersionStatus(), eZDB\instance(), reverseRelatedCount(), and eZContentObjectVersion\STATUS_PENDING.

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

## ◆ removeThis()

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.

Definition at line 3707 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), eZRole\cleanupByNode(), eZContentCacheManager\clearContentCacheIfNeeded(), eZUser\contentClassIDs(), fetchParent(), eZExtension\getHandlerClass(), eZDB\instance(), eZAudit\isAuditEnabled(), object(), eZNodeAssignment\purgeByParentAndContentObjectID(), eZUser\purgeUserCacheByUserId(), eZURLAliasML\removeByAction(), eZContentBrowseBookmark\removeByNodeID(), eZViewCounter\removeCounter(), eZTipafriendCounter\removeForNode(), eZContentBrowseRecent\removeRecentByNodeID(), eZUser\removeSessionData(), and eZAudit\writeAudit().

Referenced by removeNodeFromTree().

## ◆ reverseRelatedCount()

static eZContentObjectTreeNode::reverseRelatedCount | ( |  | $nodeIDArray | ) |
| static private

Return reverse related count for specified node

Parameters

  $nodeIDArray,array | of node id's

Returns
  reverse related count.

Definition at line 4047 of file ezcontentobjecttreenode.php.

References fetch(), and eZDB\instance().

Referenced by removeSubtrees().

## ◆ serialize()

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

Serialize ContentObjectTreeNode

\params $options \params contentNodeIDArray \params topNodeIDArray

Definition at line 5678 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), and sortFieldName().

## ◆ setContentObject()

eZContentObjectTreeNode::setContentObject | ( |  | $object | ) |

Sets the current content object for this node.

Parameters

  eZContentObject | $object |

Definition at line 5786 of file ezcontentobjecttreenode.php.

## ◆ setCurrentLanguage()

eZContentObjectTreeNode::setCurrentLanguage | ( |  | $languageCode | ) |

Sets the current node's language to $languageCode

Parameters

  string | $languageCode |

Definition at line 6226 of file ezcontentobjecttreenode.php.

References hasContentObject().

Referenced by eZNodeviewfunctions\generateNodeViewData().

## ◆ setName()

eZContentObjectTreeNode::setName | ( |  | $name | ) |

Definition at line 5532 of file ezcontentobjecttreenode.php.

## ◆ setUseCurrentUserDraft()

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 |

Definition at line 220 of file ezcontentobjecttreenode.php.

## ◆ setVersionByObjectID()

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 |

Definition at line 6205 of file ezcontentobjecttreenode.php.

References eZDB\instance().

## ◆ showInvisibleNodes()

static eZContentObjectTreeNode::showInvisibleNodes | ( |  | ) |
| static

static

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

Definition at line 1877 of file ezcontentobjecttreenode.php.

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

## ◆ sortArray()

eZContentObjectTreeNode::sortArray | ( |  | ) |

Returns
  an array which defines the sorting method for this node. The array will contain one element which is an array with sort field and sort order.

Definition at line 2804 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), and sortArrayBySortFieldAndSortOrder().

Referenced by children().

## ◆ sortArrayBySortFieldAndSortOrder()

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.

Definition at line 2816 of file ezcontentobjecttreenode.php.

References sortFieldName().

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

## ◆ sortFieldID()

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.

Definition at line 2764 of file ezcontentobjecttreenode.php.

References SORT_FIELD_CLASS_IDENTIFIER, SORT_FIELD_CLASS_NAME, SORT_FIELD_CONTENTOBJECT_ID, SORT_FIELD_DEPTH, SORT_FIELD_MODIFIED, SORT_FIELD_MODIFIED_SUBNODE, SORT_FIELD_NAME, SORT_FIELD_NODE_ID, SORT_FIELD_PATH, SORT_FIELD_PRIORITY, SORT_FIELD_PUBLISHED, SORT_FIELD_SECTION, SORT_FIELD_VISIBILITY, and eZDebug\writeWarning().

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

## ◆ sortFieldName()

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

Definition at line 2725 of file ezcontentobjecttreenode.php.

References SORT_FIELD_CLASS_IDENTIFIER, SORT_FIELD_CLASS_NAME, SORT_FIELD_CONTENTOBJECT_ID, SORT_FIELD_DEPTH, SORT_FIELD_MODIFIED, SORT_FIELD_MODIFIED_SUBNODE, SORT_FIELD_NAME, SORT_FIELD_NODE_ID, SORT_FIELD_PATH, SORT_FIELD_PRIORITY, SORT_FIELD_PUBLISHED, SORT_FIELD_SECTION, SORT_FIELD_VISIBILITY, and eZDebug\writeWarning().

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

## ◆ sortKeyByClassAttributeID()

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

Definition at line 492 of file ezcontentobjecttreenode.php.

References eZContentClassAttribute\sortKeyTypeByID().

Referenced by createAttributeFilterSQLStrings(), and createSortingSQLStrings().

## ◆ store()

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.

Reimplemented from eZPersistentObject.

Definition at line 5737 of file ezcontentobjecttreenode.php.

References eZDB\instance(), and updateAndStoreModified().

## ◆ subTree()

eZContentObjectTreeNode::subTree | ( |  | $params = `false` | ) |

Parameters

  array | bool | $params |

Returns
  array|null

Definition at line 2120 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), and subTreeByNodeID().

Referenced by children(), and clearViewCacheForSubtree().

## ◆ subTreeByNodeID()

static eZContentObjectTreeNode::subTreeByNodeID | ( |  | $params = `false`,
|  |  | $nodeID = `0`
| ) |  |
| static

Parameters

  array | bool | $params |
  int | $nodeID |

Returns
  array|null

Definition at line 1940 of file ezcontentobjecttreenode.php.

References eZContentLanguage\clearPrioritizedLanguages(), eZPersistentObject\count(), createAttributeFilterSQLStrings(), createClassFilteringSQLString(), createExtendedAttributeFilterSQLStrings(), createGroupBySQLStrings(), createMainNodeConditionSQLString(), createObjectNameFilterConditionSQLString(), createPathConditionAndNotEqParentSQLStrings(), createPermissionCheckingSQL(), createShowInvisibleSQLString(), createSortingSQLStrings(), eZContentObject\fillNodeListAttributes(), getLimitationList(), eZDB\instance(), eZContentLanguage\languagesSQLFilter(), makeObjectsArray(), eZDBInterface\SERVER_SLAVE, eZContentLanguage\setPrioritizedLanguages(), eZContentLanguage\sqlFilter(), eZDebug\writeError(), and eZDebug\writeNotice().

Referenced by eZContentObjectPackageHandler\addNode(), eZContentCacheManager\appendChildrenNodeIDs(), eZContentCacheManager\appendSiblingsNodeIDs(), eZContentObjectTreeNodeOperations\copySubtree(), eZObjectRelationType\fetchObjectAttributeHTTPInput(), eZLDAPUser\goAndPublishGroups(), eZTreeMenuOperator\modify(), eZCache\purgeImageAlias(), and subTree().

## ◆ subTreeCount()

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

Count number of subnodes

Parameters

  params | array

Definition at line 2544 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), and subTreeCountByNodeID().

Referenced by childrenCount(), clearViewCacheForSubtree(), and isNodeTrashAllowed().

## ◆ subTreeCountByNodeID()

static eZContentObjectTreeNode::subTreeCountByNodeID | ( |  | $params,
|  |  | $nodeID
| ) |  |
| static

See also
  subTreeCount

Definition at line 2394 of file ezcontentobjecttreenode.php.

References eZContentClass\classIDByIdentifier(), eZContentLanguage\clearPrioritizedLanguages(), eZPersistentObject\count(), createAttributeFilterSQLStrings(), createExtendedAttributeFilterSQLStrings(), createObjectNameFilterConditionSQLString(), createPathConditionAndNotEqParentSQLStrings(), createPermissionCheckingSQL(), createShowInvisibleSQLString(), getLimitationList(), eZDB\instance(), eZDBInterface\SERVER_SLAVE, eZContentLanguage\setPrioritizedLanguages(), eZContentLanguage\sqlFilter(), and eZDebugSetting\writeWarning().

Referenced by subTreeCount().

## ◆ subTreeGroupByDateField()

static eZContentObjectTreeNode::subTreeGroupByDateField | ( |  | $field,
|  |  | $type
| ) |  |
| static

Definition at line 2348 of file ezcontentobjecttreenode.php.

References eZDebug\writeError().

Referenced by createGroupBySQLStrings().

## ◆ subTreeMultiPaths()

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

Definition at line 2157 of file ezcontentobjecttreenode.php.

References eZContentLanguage\clearPrioritizedLanguages(), eZPersistentObject\count(), createAttributeFilterSQLStrings(), createClassFilteringSQLString(), createExtendedAttributeFilterSQLStrings(), createGroupBySQLStrings(), createMainNodeConditionSQLString(), createPathConditionAndNotEqParentSQLStrings(), createPermissionCheckingSQL(), createShowInvisibleSQLString(), createSortingSQLStrings(), getLimitationList(), eZDB\instance(), eZContentLanguage\languagesSQLFilter(), makeObjectsArray(), eZDBInterface\SERVER_SLAVE, eZContentLanguage\setPrioritizedLanguages(), eZContentLanguage\sqlFilter(), eZDebug\writeError(), and eZDebug\writeWarning().

Referenced by eZRSSExportItem\fetchNodeList().

## ◆ subtreeRemovalInformation()

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.

Definition at line 3826 of file ezcontentobjecttreenode.php.

References removeSubtrees().

Referenced by eZContentObjectPackageHandler\uninstall().

## ◆ subtreeSoleNodeCount()

eZContentObjectTreeNode::subtreeSoleNodeCount | ( |  | $params = `array()` | ) |

Returns the number of nodes in the current subtree that have no other placements.

Parameters

  array | $params |

Returns
  int

Definition at line 4168 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), eZPersistentObject\count(), eZDB\instance(), and eZDBInterface\SERVER_SLAVE.

## ◆ unhideSubTree()

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 | $node | Root node of the subtree
  bool | $modifyRootNode | Whether to modify the root node (true/false)

Definition at line 6049 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), clearViewCacheForSubtree(), eZDB\instance(), eZAudit\isAuditEnabled(), updateAndStoreModified(), eZAudit\writeAudit(), and eZDebug\writeError().

Referenced by updateNodeVisibility().

## ◆ unserialize()

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

Creates propper nodeassigment from contentNodeDOMNode specification

Parameters

  contentobjecttreenode | DOMNode
  contentobject. |
  version |
  isMain |
  options |

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

Definition at line 5550 of file ezcontentobjecttreenode.php.

References eZNodeAssignment\create(), eZNodeAssignment\definition(), eZPackageHandler\errorChoosenAction(), fetchByRemoteID(), eZPersistentObject\fetchObject(), eZRemoteIdUtility\generate(), eZPackage\NON_INTERACTIVE, eZContentObject\PACKAGE_ERROR_EXISTS, eZContentObject\PACKAGE_ERROR_NODE_EXISTS, eZContentObject\PACKAGE_NEW, eZContentObject\PACKAGE_UPDATE, sortFieldID(), and eZDebug\writeError().

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

## ◆ updateAndStoreModified()

eZContentObjectTreeNode::updateAndStoreModified | ( |  | ) |

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

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

Definition at line 5716 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), eZPersistentObject\count(), and eZDB\instance().

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

## ◆ updateMainNodeID()

static eZContentObjectTreeNode::updateMainNodeID | ( |  | $mainNodeID,
|  |  | $objectID,
|  |  | $version,
|  |  | $parentMainNodeID,
|  |  | $updateSection = `true`
| ) |  |
| static

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

Parameters

  $mainNodeID | The ID of the node that should be that main node
  $objectID | The ID of the object that all nodes belong to
  $version | The version of the object to update node assignments, use `false` for currently published version.
  $parentMainNodeID | The ID of the parent node of the new main placement

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

Definition at line 2882 of file ezcontentobjecttreenode.php.

References assignSectionToSubTree(), eZContentObject\fetch(), eZContentObject\fetchByNodeID(), and eZDB\instance().

Referenced by eZContentObjectPackageHandler\installSuspendedNodeAssignment(), eZLDAPUser\publishUpdateUser(), and removeNodeFromTree().

## ◆ updateNodeVisibility()

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 |

Definition at line 6119 of file ezcontentobjecttreenode.php.

References hideSubTree(), eZDB\instance(), unhideSubTree(), and eZDebug\writeWarning().

Referenced by move().

## ◆ updatePathIdentificationString()

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

Definition at line 3639 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), fetchParent(), eZDB\instance(), eZPersistentObject\setAttribute(), eZPersistentObject\sync(), and eZDebug\writeError().

Referenced by updateSubTreePath().

## ◆ 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.

Definition at line 3506 of file ezcontentobjecttreenode.php.

References adjustPathElement(), eZPersistentObject\attribute(), eZURLAliasML\convertToAlias(), eZURLAliasML\convertToAliasCompat(), eZPersistentObject\count(), eZURLAliasML\fetchByAction(), fetchParent(), object(), eZURLAliasFilter\processFilters(), eZURLAliasML\storePath(), updatePathIdentificationString(), and eZDebug\writeError().

## ◆ url()

eZContentObjectTreeNode::url | ( |  | ) |

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

Returns
  string

Definition at line 5872 of file ezcontentobjecttreenode.php.

References eZPersistentObject\$NodeID, and urlAlias().

## ◆ urlAlias()

eZContentObjectTreeNode::urlAlias | ( |  | ) |

Returns the node's url alias

Returns
  string

Definition at line 5830 of file ezcontentobjecttreenode.php.

References eZURLAliasML\cleanURL(), and pathWithNames().

Referenced by url().

## ◆ viewCount()

eZContentObjectTreeNode::viewCount | ( |  | ) |

Get amount views of content node.

Definition at line 2715 of file ezcontentobjecttreenode.php.

References eZPersistentObject\attribute(), and eZViewCounter\fetch().

## Member Data Documentation

## ◆ $ClassIdentifier

eZContentObjectTreeNode::$ClassIdentifier = null

Definition at line 6487 of file ezcontentobjecttreenode.php.

Referenced by classIdentifier().

## ◆ $ClassIsContainer

eZContentObjectTreeNode::$ClassIsContainer = null
| protected

Definition at line 6500 of file ezcontentobjecttreenode.php.

Referenced by classIsContainer().

## ◆ $ClassName

eZContentObjectTreeNode::$ClassName = null

Definition at line 6492 of file ezcontentobjecttreenode.php.

Referenced by className().

## ◆ $ContentObject

eZContentObjectTreeNode::$ContentObject

Definition at line 6494 of file ezcontentobjecttreenode.php.

Referenced by object().

## ◆ $CurrentLanguage

eZContentObjectTreeNode::$CurrentLanguage = false

Definition at line 6477 of file ezcontentobjecttreenode.php.

Referenced by contentObjectVersionObject(), and currentLanguage().

## ◆ $Name

eZContentObjectTreeNode::$Name

Definition at line 6482 of file ezcontentobjecttreenode.php.

Referenced by getName().

## ◆ $Permissions

eZContentObjectTreeNode::$Permissions

Definition at line 6495 of file ezcontentobjecttreenode.php.

## ◆ $useCurrentUserDraft

eZContentObjectTreeNode::$useCurrentUserDraft = false
| static protected

Definition at line 209 of file ezcontentobjecttreenode.php.

## ◆ SORT_FIELD_CLASS_IDENTIFIER

const eZContentObjectTreeNode::SORT_FIELD_CLASS_IDENTIFIER = 6

Definition at line 23 of file ezcontentobjecttreenode.php.

Referenced by sortFieldID(), and sortFieldName().

## ◆ SORT_FIELD_CLASS_NAME

const eZContentObjectTreeNode::SORT_FIELD_CLASS_NAME = 7

Definition at line 24 of file ezcontentobjecttreenode.php.

Referenced by sortFieldID(), and sortFieldName().

## ◆ SORT_FIELD_CONTENTOBJECT_ID

const eZContentObjectTreeNode::SORT_FIELD_CONTENTOBJECT_ID = 12

Definition at line 29 of file ezcontentobjecttreenode.php.

Referenced by sortFieldID(), and sortFieldName().

## ◆ SORT_FIELD_DEPTH

const eZContentObjectTreeNode::SORT_FIELD_DEPTH = 5

Definition at line 22 of file ezcontentobjecttreenode.php.

Referenced by sortFieldID(), and sortFieldName().

## ◆ SORT_FIELD_MODIFIED

const eZContentObjectTreeNode::SORT_FIELD_MODIFIED = 3

Definition at line 20 of file ezcontentobjecttreenode.php.

Referenced by sortFieldID(), and sortFieldName().

## ◆ SORT_FIELD_MODIFIED_SUBNODE

const eZContentObjectTreeNode::SORT_FIELD_MODIFIED_SUBNODE = 10

Definition at line 27 of file ezcontentobjecttreenode.php.

Referenced by sortFieldID(), and sortFieldName().

## ◆ SORT_FIELD_NAME

const eZContentObjectTreeNode::SORT_FIELD_NAME = 9

Definition at line 26 of file ezcontentobjecttreenode.php.

Referenced by sortFieldID(), and sortFieldName().

## ◆ SORT_FIELD_NODE_ID

const eZContentObjectTreeNode::SORT_FIELD_NODE_ID = 11

Definition at line 28 of file ezcontentobjecttreenode.php.

Referenced by sortFieldID(), and sortFieldName().

## ◆ SORT_FIELD_PATH

const eZContentObjectTreeNode::SORT_FIELD_PATH = 1

Definition at line 18 of file ezcontentobjecttreenode.php.

Referenced by eZNodeAssignment\definition(), sortFieldID(), and sortFieldName().

## ◆ SORT_FIELD_PRIORITY

const eZContentObjectTreeNode::SORT_FIELD_PRIORITY = 8

Definition at line 25 of file ezcontentobjecttreenode.php.

Referenced by sortFieldID(), and sortFieldName().

## ◆ SORT_FIELD_PUBLISHED

const eZContentObjectTreeNode::SORT_FIELD_PUBLISHED = 2

Definition at line 19 of file ezcontentobjecttreenode.php.

Referenced by eZNodeAssignment\create(), eZObjectRelationListType\onPublish(), sortFieldID(), and sortFieldName().

## ◆ SORT_FIELD_SECTION

const eZContentObjectTreeNode::SORT_FIELD_SECTION = 4

Definition at line 21 of file ezcontentobjecttreenode.php.

Referenced by sortFieldID(), and sortFieldName().

## ◆ SORT_FIELD_VISIBILITY

const eZContentObjectTreeNode::SORT_FIELD_VISIBILITY = 13

Definition at line 30 of file ezcontentobjecttreenode.php.

Referenced by sortFieldID(), and sortFieldName().

## ◆ SORT_ORDER_ASC

const eZContentObjectTreeNode::SORT_ORDER_ASC = 1

Definition at line 33 of file ezcontentobjecttreenode.php.

Referenced by eZContentObjectVersion\assignToNode(), and eZNodeAssignment\definition().

## ◆ SORT_ORDER_DESC

const eZContentObjectTreeNode::SORT_ORDER_DESC = 0

Definition at line 32 of file ezcontentobjecttreenode.php.

Referenced by eZContentObjectVersion\assignToNode(), eZNodeAssignment\create(), and eZObjectRelationListType\onPublish().

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

- ezcontentobjecttreenode.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.