📚 Looking for current Exponential documentation? This site contains legacy SDK & API reference docs (eZ Publish era). For up-to-date 2026 product documentation, visit doc.exponential.earth.

  class / eZContentObjectTreeNode  

eZContentObjectTreeNode Class Reference

The class eZContentObjectTreeNode does. More...

Inheritance diagram for eZContentObjectTreeNode:

eZPersistentObject List of all members.

Public Methods

 eZContentObjectTreeNode ($row=array())
& definition ()
 attributes ()
& attribute ($attr)
& dataMap ()
& childrenByName ($name)
& children ()
& childrenCount ()
 sortFieldName ($sortOrder)
 sortArray ()
 assignSectionToSubTree ($nodeID,$sectionID)
 creator ()

Detailed Description

The class eZContentObjectTreeNode does.


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

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

2. Deleting node ( or subtree )
Enter - node_id

3. Move subtree in tree
Enter node_id,new_parent_id

4. fetching subtree

Definition at line ezcontentobjecttreenode.php.


Constructor & Destructor Documentation

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

Constructor

Definition at line ezcontentobjecttreenode.php.

References eZPersistentObject::eZPersistentObject().


Member Function Documentation

eZContentObjectTreeNode::assignSectionToSubTree (  $    nodeID,
$    sectionID
) 
 

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

Definition at line ezcontentobjecttreenode.php.

References eZDB::instance().

& eZContentObjectTreeNode::attribute (  $    attr ) 
 

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.

Reimplemented from eZPersistentObject.

Definition at line ezcontentobjecttreenode.php.

References sortArray().

Referenced by sortArray().

eZContentObjectTreeNode::attributes (    ) 
 

Returns:
the attributes for this object, taken from the definition fields and function attributes.

Reimplemented from eZPersistentObject.

Definition at line ezcontentobjecttreenode.php.

References eZPersistentObject::attributes().

& eZContentObjectTreeNode::children (    ) 
 

Returns the first level children in sorted order.

Definition at line ezcontentobjecttreenode.php.

Referenced by attribute().

& eZContentObjectTreeNode::childrenByName (  $    name ) 
 

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

Definition at line ezcontentobjecttreenode.php.

References eZDB::instance().

& eZContentObjectTreeNode::childrenCount (    ) 
 

Returns the number of children for the current node.

Definition at line ezcontentobjecttreenode.php.

Referenced by attribute().

eZContentObjectTreeNode::creator (    ) 
 

Returns:
the creator of the version published in the node.

Definition at line ezcontentobjecttreenode.php.

References eZDB::instance().

Referenced by definition().

& eZContentObjectTreeNode::dataMap (    ) 
 

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

Definition at line ezcontentobjecttreenode.php.

Referenced by definition().

& eZContentObjectTreeNode::definition (    ) 
 

Returns:
the definition for the object, the default implementation is to return an empty array. It's upto each inheriting class to return a proper definition array.
The definition array is an associative array consists of these keys:
  • fields - an associative array of fields which defines which database field (the key) is to fetched and how they map to object member variables (the value).
  • keys - an array of fields which is used for uniquely identifying the object in the table.
  • function_attributes - an associative array of attributes which maps to member functions, used for fetching data with functions.
  • set_functions - an associative array of attributes which maps to member functions, used for setting data with functions.
  • increment_key - the field which is incremented on table inserts.
  • class_name - the classname which is used for instantiating new objecs when fetching from the database.
  • sort - an associative array which defines the default sorting of lists, the key is the table field while the value is the sorting method which is either asc or desc.
  • name - the name of the database table
Example:
function definition()
{
    return array( "fields" => array( "id" => "ID",
                                     "version" => "Version",
                                     "name" => "Name" ),
                  "keys" => array( "id", "version" ),
                  "function_attributes" => array( "current" => "currentVersion",
                                                  "class_name" => "className" ),
                  "increment_key" => "id",
                  "class_name" => "eZContentClass",
                  "sort" => array( "id" => "asc" ),
                  "name" => "ezcontentclass" );
}

Reimplemented from eZPersistentObject.

Definition at line ezcontentobjecttreenode.php.

References 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 ezcontentobjecttreenode.php.

References sortFieldName().

Referenced by definition().

eZContentObjectTreeNode::sortFieldName (  $    sortOrder ) 
 

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

Definition at line ezcontentobjecttreenode.php.

References eZDebug::writeWarning().

Referenced by sortFieldName().


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

Exponential Copyright © 1998 - 2026 7x