Class

eZContentObjectTreeNode

class eZContentObjectTreeNode extends eZPersistentObject

Encapsulates data about and methods to work with content objects inside the content object tree

Constants

SORT_FIELD_PATH

SORT_FIELD_PUBLISHED

SORT_FIELD_MODIFIED

SORT_FIELD_SECTION

SORT_FIELD_DEPTH

SORT_FIELD_CLASS_IDENTIFIER

SORT_FIELD_CLASS_NAME

SORT_FIELD_PRIORITY

SORT_FIELD_NAME

SORT_FIELD_MODIFIED_SUBNODE

SORT_FIELD_NODE_ID

SORT_FIELD_CONTENTOBJECT_ID

SORT_FIELD_VISIBILITY

SORT_ORDER_DESC

SORT_ORDER_ASC

Properties

bool $PersistentDataDirty Whether the data is dirty, ie needs to be stored, or not.
string|bool $CurrentLanguage
string $Name
string|null $ClassIdentifier
string|null $ClassName

Methods

__construct(int|array $row = null)

Initializes the object with the $row.

from eZPersistentObject
eZPersistentObject(int|array $row = null)

from eZPersistentObject
bool fill(array $row)

Tries to fill in the data in the object by using the object definition which is returned by the function definition() and the database row data $row.

from eZPersistentObject
static void replaceFieldsWithShortNames(eZDBInterface $db, array $fieldDefs, array $fields)

For the given array $fields treats its keys (for associative array) or values (for non-associative array) as table fields names and replaces them with short names (aliases) found in $fieldDefs.

from eZPersistentObject
static int count(array $def, array|null $conds = null, string|null $field = null)

Fetches the number of rows by using the object definition.

from eZPersistentObject
static eZPersistentObject|array|null fetchObject($def, $field_filters, $conds, $asObject = true, $grouping = null, $custom_fields = null)

Fetches and returns an object based on the given parameters and returns is either as an object or as an array

from eZPersistentObject
void remove(array|null $conditions = null, array|null $extraConditions = null)

Removes the object from the database, it will use the keys in the object definition to figure out which table row should be removed unless $conditions is defined as an array with fieldnames.

from eZPersistentObject
static void removeObject(array $def, array|null $conditions = null, array|null $extraConditions = null)

Deletes the object from the table defined in $def with conditions $conditions and extra conditions \a $extraConditions.

from eZPersistentObject
void store(array|null $fieldFilters = null)

Stores the object in the database, uses storeObject() to do the actual job and passes $fieldFilters to it.

void sync(array|null $fieldFilters = null)

Makes sure data is stored if the data is considered dirty.

from eZPersistentObject
static void storeObject(eZPersistentObject $obj, array|null $fieldFilters = null)

Stores the data in $obj to database.

from eZPersistentObject
static string conditionText(array $conditions)

Calls conditionTextByRow with an empty row and $conditions.

from eZPersistentObject
static string conditionTextByRow(array $conditions, array|null $row)

Generates an SQL sentence from the conditions \a $conditions and row data $row.

from eZPersistentObject
static eZPersistentObject[]|array|null fetchObjectList(array $def, array|null $field_filters = null, array|null $conds = null, array|null|bool $sorts = null, array|null $limit = null, bool $asObject = true, array|null|bool $grouping = false, null $custom_fields = null, array|null $custom_tables = null, string|null $custom_conds = null)

Creates an SQL query out of the different parameters and returns an array with the result.

from eZPersistentObject
static eZPersistentObject[]|array handleRows(array $rows, string $class_name, bool $asObject)

Creates PHP objects out of the database rows $rows.

from eZPersistentObject
static string swapRow(string $table, array $keys, int $order_id, array $rows, int $id1, int $id2)

Sets row id $id2 to have the placement of row id $id1.

from eZPersistentObject
static int newObjectOrder(array $def, string $orderField, array $conditions)

Returns an order value which can be used for new items in table, for instance placement.

from eZPersistentObject
static void reorderObject(array $def, array $orderField, array $conditions, bool $down = true)

Moves a row in a database table.

from eZPersistentObject
static array definition()

Returns the definition for the object, the default implementation is to return an empty array.

from eZPersistentObject
static array escapeArray(array $array)

Escapes strings in an array with the help of {@link eZDBInterface::escapeString()}

from eZPersistentObject
static void updateObjectList(array $parameters)

Updates rows matching the given parameters

from eZPersistentObject
array attributes()

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

from eZPersistentObject
bool hasAttribute(string $attr)

Checks if $attr is part of the definition fields or function attributes.

from eZPersistentObject
mixed attribute(string $attr, bool $noFunction = false)

Returns the attribute data for $attr, this is either returned from the member variables or a member function depending on whether the definition field or function attributes matched.

from eZPersistentObject
void setAttribute(string $attr, mixed $val)

Sets the attribute $attr to the value $val.

from eZPersistentObject
bool hasDirtyData()

Returns true if the data is considered dirty and needs to be stored.

from eZPersistentObject
void setHasDirtyData(bool $hasDirtyData)

Sets whether the object has dirty data or not.

from eZPersistentObject
static string getShortAttributeName(eZDBInterface $db, array $def, string $attrName)

Returns the short attribute name (alias) if it's defined, given attribute name otherwise

from eZPersistentObject
static  setUseCurrentUserDraft(bool $enable)

Enables / disables Use current user draft mode for data map

eZContentObjectAttribute[] dataMap()

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

string remoteID()

Get the remote id of content node

bool isMain()

Returns true if this node is the main node.

bool canRead()

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

bool canPdf()

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

bool canViewEmbed()

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

bool canEdit()

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

bool canHide()

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

bool canCreate()

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

bool canRemove()

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

bool canMoveFrom()

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

bool canMoveTo(bool $classID = false)

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

bool canSwap()

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

bool canAddLocation()

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

bool canRemoveLocation()

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

array|null subTree(array|bool $params = false)

subTreeCount($params = array())

childrenByName($name)

array|null children()

Returns the first level children in sorted order.

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)

updatePathIdentificationString($pathIdentificationName)

removeThis()

removeNodeFromTree($moveToTrash = true)

int subtreeSoleNodeCount(array $params = array())

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

move($newParentNodeID, $nodeID)

checkAccess($functionName, $originalClassID = false, $parentClassID = false, $returnAccessList = false, $language = false)

classListFromPolicy($policy, $allowedLanguageCodes = false)

canCreateClassList($asObject = false, $includeFilter = true, $groupList = false, $fetchID = false)

static  makeObjectsArray($array, $with_contentobject = true, array $propertiesOverride = null, $lang = null)

getName($language = false)

setName($name)

serialize($options, $contentNodeIDArray, $topNodeIDArray)

updateAndStoreModified()

eZContentObject object()

Returns the eZContentObject associated to this node

bool hasContentObject()

Checks if the node's contentobject has already loaded

setContentObject(eZContentObject $object)

Sets the current content object for this node.

eZContentObject creator()

Returns the creator of the version published in the node.

eZContentObjectVersion|array|bool contentObjectVersionObject(bool $asObject = true)

Returns the eZContentObjectVersionObject of the current node

string urlAlias()

Returns the node's url alias

string url()

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

string|bool|string|null classIdentifier()

Returns the node's class identifier

string|null className()

Returns the node's class name

int|null classIsContainer()

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

string hiddenInvisibleString()

Returns combined string representation of both "ishidden" and "isinvisible" attributes

string hiddenStatusString()

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

string currentLanguage()

Returns the node's current language

setCurrentLanguage(string $languageCode)

Sets the current node's language to $languageCode

string availableClassesJsArray()

Returns available classes as Js array.

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

Details

in eZPersistentObject at line 52
public __construct(int|array $row = null)

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

in eZPersistentObject at line 64
public eZPersistentObject(int|array $row = null)

Parameters

int|array $row

in eZPersistentObject at line 80
public bool fill(array $row)

Tries to fill in the data in the object by using the object definition which is returned by the function definition() and the database row data $row.

Each field will be fetch from the definition and then use that fieldname to fetch from the row and set the data.

Parameters

array $row

Return Value

bool

in eZPersistentObject at line 110
static public void replaceFieldsWithShortNames(eZDBInterface $db, array $fieldDefs, array $fields)

For the given array $fields treats its keys (for associative array) or values (for non-associative array) as table fields names and replaces them with short names (aliases) found in $fieldDefs.

Parameters

eZDBInterface $db
array $fieldDefs
array $fields

Return Value

void

in eZPersistentObject at line 187
static public int count(array $def, array|null $conds = null, string|null $field = null)

Fetches the number of rows by using the object definition.

Uses fetchObjectList for the actual SQL handling. See {@link eZPersistentObject::fetchObjectList()} for a full description of the input parameters.

Parameters

array $def A definition array of all fields, table name and sorting (see {@link eZPersistentObject::definition()} for more info)
array|null $conds
string|null $field

Return Value

int

in eZPersistentObject at line 213
static public eZPersistentObject|array|null fetchObject($def, $field_filters, $conds, $asObject = true, $grouping = null, $custom_fields = null)

Fetches and returns an object based on the given parameters and returns is either as an object or as an array

See {@link eZPersistentObject::fetchObjectList()} for a full description of the input parameters.

Parameters

$def
$field_filters
$conds
$asObject
$grouping
$custom_fields

Return Value

eZPersistentObject|array|null

in eZPersistentObject at line 239
public void remove(array|null $conditions = null, array|null $extraConditions = null)

Removes the object from the database, it will use the keys in the object definition to figure out which table row should be removed unless $conditions is defined as an array with fieldnames.

It uses removeObject to do the real job and passes the object defintion, conditions and extra conditions \a $extraConditions to this function.

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.

Parameters

array|null $conditions
array|null $extraConditions

Return Value

void

in eZPersistentObject at line 271
static public void removeObject(array $def, array|null $conditions = null, array|null $extraConditions = null)

Deletes the object from the table defined in $def with conditions $conditions and extra conditions \a $extraConditions.

The extra conditions will either be appended to the existing conditions or overwrite existing fields.

Uses conditionText() to create the condition SQL.

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.

Parameters

array $def A definition array of all fields, table name and sorting (see {@link eZPersistentObject::definition()} for more info)
array|null $conditions
array|null $extraConditions

Return Value

void

at line 5721
public void store(array|null $fieldFilters = null)

Stores the object in the database, uses storeObject() to do the actual job and passes $fieldFilters to it.

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.

Parameters

array|null $fieldFilters

Return Value

void

in eZPersistentObject at line 319
public void sync(array|null $fieldFilters = null)

Makes sure data is stored if the data is considered dirty.

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.

Parameters

array|null $fieldFilters

Return Value

void

in eZPersistentObject at line 338
static public void storeObject(eZPersistentObject $obj, array|null $fieldFilters = null)

Stores the data in $obj to database.

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.

Parameters

eZPersistentObject $obj
array|null $fieldFilters If specified only certain fields will be stored.

Return Value

void

in eZPersistentObject at line 621
static public string conditionText(array $conditions)

Calls conditionTextByRow with an empty row and $conditions.

Parameters

array $conditions

Return Value

string

in eZPersistentObject at line 636
static public string conditionTextByRow(array $conditions, array|null $row)

Generates an SQL sentence from the conditions \a $conditions and row data $row.

If $row is empty (or null) it uses the condition data instead of row data.

Parameters

array $conditions
array|null $row

Return Value

string

in eZPersistentObject at line 799
static public eZPersistentObject[]|array|null fetchObjectList(array $def, array|null $field_filters = null, array|null $conds = null, array|null|bool $sorts = null, array|null $limit = null, bool $asObject = true, array|null|bool $grouping = false, null $custom_fields = null, array|null $custom_tables = null, string|null $custom_conds = null)

Creates an SQL query out of the different parameters and returns an array with the result.

A full example: $filter = array( 'id', 'name' ); $conds = array( 'type' => 5, 'size' => array( false, array( 200, 500 ) ) ); $sorts = array( 'name' => 'asc' ); $limit = array( 'offset' => 50, 'length' => 10 ); eZPersistentObject::fetchObjectList( $def, $filter, $conds, $sorts, $limit, true, false, null )

Counting number of elements. $custom = array( array( 'operation' => 'count( id )', 'name' => 'count' ) ); // Here $field_filters is set to an empty array, that way only count is used in fields $rows = eZPersistentObject::fetchObjectList( $def, array(), null, null, null, false, false, $custom ); return $rows[0]['count'];

Counting elements per type using grouping $custom = array( array( 'operation' => 'count( id )', 'name' => 'count' ) ); $group = array( 'type' ); $rows = eZPersistentObject::fetchObjectList( $def, array(), null, null, null, false, $group, $custom ); return $rows[0]['count'];

Example to fetch a result with custom conditions. The following example will fetch the attributes to the contentobject with id 1 and add the contentobject.name in each attribute row with the array key contentobject_name. $objectDef = eZContentObject::definition(); $objectAttributeDef = eZContentObjectAttribute::definition();

$fields = array(); $conds = array( $objectDef['name'] . '.id' => 1 ); $sorts = array( $objectAttributeDef['name'] . '.sortkeystring' => 'asc' );

$limit = null; $asObject = false; $group = false;

$customFields = array( $objectAttributeDef['name'] . '.*', array( 'operation' => $objectDef['name'] . '.name', 'name' => 'contentobject_name' ) );

$customTables = array( $objectDef['name'] );

$languageCode = 'eng-GB'; $customConds = ' AND ' . $objectDef['name'] . '.currentversion=' . $objectAttributeDef['name'] . '.version' . ' AND ' . $objectDef['name'] . '.id=' . $objectAttributeDef['name'] . '.contentobjectid' . ' AND ' . $objectAttributeDef['name'] . '.language_code=\'' . $languageCode . '\'';

$rows = eZPersistentObject::fetchObjectList( $objectAttributeDef, $fields, $conds, $sorts, $limit, $asObject, $group, $customFields, $customTables, $customConds );

Parameters

array $def A definition array of all fields, table name and sorting (see {@link eZPersistentObject::definition()} for more info)
array|null $field_filters If defined determines the fields which are extracted (array of field names), if not all fields are fetched
array|null $conds null for no special condition or an associative array of fields to filter on. Syntax is FIELD => CONDITION CONDITION can be one of: - Scalar value: Creates a condition where FIELD must match the value, e.g array( 'id' => 5 ) generates SQL id = 5 - Array with two scalar values: The first value is the match operator, the second is the scalar value array( 'priority' => array( '>', 5 ) ) generates SQL priority > 5 - Array with range: The first value is false, the second value is an array with start and stop of range in array array( 'type' => array( false, array( 1, 5 ) ) ) generates SQL type BETWEEN 1 AND 5 - Array with multiple elements: The first value is the field identifier, the second is an array with scalar values array( 'id' => array( array( 1, 5, 7 ) ) ) generates SQL id IN ( 1, 5, 7 )
array|null|bool $sorts An associative array of sorting conditions, if set to false ignores settings in $def, if set to null uses settingss in $def. Syntax is FIELD => DIRECTION. DIRECTION must either be 'asc' for ascending or 'desc' for descending.
array|null $limit An associative array with limitiations, can contain - 'offset': Numerical value defining the start offset for the fetch - 'length': Numerical value defining the max number of items to return
bool $asObject If true then it will return an array with objects, objects are created from class defined in $def. If falseit will just return the rows fetch from database.
array|null|bool $grouping An array of fields to group by or null to use grouping in defintion $def.
null $custom_fields Array of FIELD elements to add to SQL, can be used to perform custom fetches, e.g counts. FIELD is an associative array containing: - 'operation': A text field which is included in the field list - 'name': If present it adds AS name to the operation.
array|null $custom_tables Array of additional tables
string|null $custom_conds String with sql conditions for 'WHERE' clause.

Return Value

eZPersistentObject[]|array|null An array of objects or rows, null on error

in eZPersistentObject at line 956
static public eZPersistentObject[]|array handleRows(array $rows, string $class_name, bool $asObject)

Creates PHP objects out of the database rows $rows.

Each object is created from class \$ class_name and is passed as a row array as parameter.

Parameters

array $rows
string $class_name
bool $asObject If true then objects will be created, if not it just returns $rows as it is.

Return Value

eZPersistentObject[]|array

in eZPersistentObject at line 1000
static public string swapRow(string $table, array $keys, int $order_id, array $rows, int $id1, int $id2)

Sets row id $id2 to have the placement of row id $id1.

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.

Parameters

string $table
array $keys
int $order_id
array $rows
int $id1
int $id2

Return Value

string

in eZPersistentObject at line 1027
static public int newObjectOrder(array $def, string $orderField, array $conditions)

Returns an order value which can be used for new items in table, for instance placement.

Uses $def, $orderField and $conditions to figure out the currently maximum order value and returns one that is larger.

Parameters

array $def A definition array of all fields, table name and sorting (see {@link eZPersistentObject::definition()} for more info)
string $orderField
array $conditions

Return Value

int

in eZPersistentObject at line 1062
static public void reorderObject(array $def, array $orderField, array $conditions, bool $down = true)

Moves a row in a database table.

Uses $orderField to determine the order of objects in a table, usually this is a placement of some kind. It uses this order field to figure out how move the row, the row is either swapped with another row which is either above or below according to whether $down is true or false, or it is swapped with the first item or the last item depending on whether this row is first or last. Uses $conditions to figure out unique rows.

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.

Parameters

array $def A definition array of all fields, table name and sorting (see {@link eZPersistentObject::definition()} for more info)
array $orderField Associative array with one element, the key is the order id and values is order value.
array $conditions
bool $down

Return Value

void

in eZPersistentObject at line 1159
static public array 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.

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

Return Value

array

in eZPersistentObject at line 1170
static public array escapeArray(array $array)

Escapes strings in an array with the help of {@link eZDBInterface::escapeString()}

Parameters

array $array

Return Value

array

in eZPersistentObject at line 1202
static public void updateObjectList(array $parameters)

Updates rows matching the given parameters

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.

Parameters

array $parameters

Return Value

void

in eZPersistentObject at line 1285
public array attributes()

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

Return Value

array

See also

eZPersistentObject::definition()

in eZPersistentObject at line 1302
public bool hasAttribute(string $attr)

Checks if $attr is part of the definition fields or function attributes.

Parameters

string $attr

Return Value

bool

in eZPersistentObject at line 1322
public mixed attribute(string $attr, bool $noFunction = false)

Returns the attribute data for $attr, this is either returned from the member variables or a member function depending on whether the definition field or function attributes matched.

Parameters

string $attr
bool $noFunction

Return Value

mixed

in eZPersistentObject at line 1367
public void setAttribute(string $attr, mixed $val)

Sets the attribute $attr to the value $val.

The attribute must be present in the objects definition fields or set functions.

Parameters

string $attr
mixed $val

Return Value

void

in eZPersistentObject at line 1407
public bool hasDirtyData()

Returns true if the data is considered dirty and needs to be stored.

Return Value

bool

in eZPersistentObject at line 1418
public void setHasDirtyData(bool $hasDirtyData)

Sets whether the object has dirty data or not.

Parameters

bool $hasDirtyData

Return Value

void

in eZPersistentObject at line 1431
static public string getShortAttributeName(eZDBInterface $db, array $def, string $attrName)

Returns the short attribute name (alias) if it's defined, given attribute name otherwise

Parameters

eZDBInterface $db
array $def A definition array of all fields, table name and sorting (see {@link eZPersistentObject::definition()} for more info)
string $attrName

Return Value

string

at line 206
static public setUseCurrentUserDraft(bool $enable)

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.

Parameters

bool $enable

at line 217
public eZContentObjectAttribute[] dataMap()

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

Return Value

eZContentObjectAttribute[]

See also

eZContentObject::fetchDataMap()

at line 244
public string 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.

Return Value

string

at line 262
public bool isMain()

Returns true if this node is the main node.

Return Value

bool

at line 296
public bool canRead()

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

Return Value

bool

at line 310
public bool canPdf()

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

Return Value

bool

at line 324
public bool canViewEmbed()

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

Return Value

bool

at line 338
public bool canEdit()

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

Return Value

bool

at line 364
public bool canHide()

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

Return Value

bool

at line 378
public bool canCreate()

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

Return Value

bool

at line 392
public bool canRemove()

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

Return Value

bool

at line 406
public bool canMoveFrom()

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

Return Value

bool

at line 421
public bool canMoveTo(bool $classID = false)

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

Parameters

bool $classID

Return Value

bool

at line 435
public bool canSwap()

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

Return Value

bool

at line 449
public bool canAddLocation()

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

Return Value

bool

at line 463
public bool canRemoveLocation()

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

Return Value

bool

at line 2091
public array|null subTree(array|bool $params = false)

Parameters

array|bool $params

Return Value

array|null

at line 2515
public subTreeCount($params = array())

Parameters

$params

at line 2631
public childrenByName($name)

Parameters

$name

at line 2662
public array|null children()

Returns the first level children in sorted order.

Return Value

array|null

at line 2674
public childrenCount($checkPolicies = true)

Parameters

$checkPolicies

at line 2686
public viewCount()

at line 2775
public sortArray()

at line 2898
public fetchByCRC($pathStr)

Parameters

$pathStr

at line 3188
public fetchParent()

at line 3193
public pathArray()

at line 3207
public fetchPath()

at line 3295
public addChild($contentobjectID, $asObject = false, $contentObjectVersion = false)

Parameters

$contentobjectID
$asObject
$contentObjectVersion

at line 3368
public pathWithNames($regenerateCurrent = false)

Parameters

$regenerateCurrent

at line 3439
public checkPath($path)

Parameters

$path

at line 3463
public adjustPathElement($element, $useParentFromNodeObject = false)

Parameters

$element
$useParentFromNodeObject

at line 3492
public updateSubTreePath($updateParent = true, $nodeMove = false)

Parameters

$updateParent
$nodeMove

at line 3625
public updatePathIdentificationString($pathIdentificationName)

Parameters

$pathIdentificationName

at line 3693
public removeThis()

at line 4082
public removeNodeFromTree($moveToTrash = true)

Parameters

$moveToTrash

at line 4152
public int subtreeSoleNodeCount(array $params = array())

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

Parameters

array $params

Return Value

int

at line 4224
public move($newParentNodeID, $nodeID)

Parameters

$newParentNodeID
$nodeID

at line 4342
public checkAccess($functionName, $originalClassID = false, $parentClassID = false, $returnAccessList = false, $language = false)

Parameters

$functionName
$originalClassID
$parentClassID
$returnAccessList
$language

at line 4810
public classListFromPolicy($policy, $allowedLanguageCodes = false)

Parameters

$policy
$allowedLanguageCodes

at line 5061
public canCreateClassList($asObject = false, $includeFilter = true, $groupList = false, $fetchID = false)

Parameters

$asObject
$includeFilter
$groupList
$fetchID

at line 5211
static public makeObjectsArray($array, $with_contentobject = true, array $propertiesOverride = null, $lang = null)

Parameters

$array
$with_contentobject
array $propertiesOverride
$lang

at line 5478
public getName($language = false)

Parameters

$language

at line 5516
public setName($name)

Parameters

$name

at line 5662
public serialize($options, $contentNodeIDArray, $topNodeIDArray)

Parameters

$options
$contentNodeIDArray
$topNodeIDArray

at line 5700
public updateAndStoreModified()

at line 5736
public eZContentObject object()

Returns the eZContentObject associated to this node

Return Value

eZContentObject

at line 5757
public bool hasContentObject()

Checks if the node's contentobject has already loaded

Return Value

bool

at line 5770
public setContentObject(eZContentObject $object)

Sets the current content object for this node.

Parameters

eZContentObject $object

at line 5780
public eZContentObject creator()

Returns the creator of the version published in the node.

Return Value

eZContentObject

at line 5799
public eZContentObjectVersion|array|bool contentObjectVersionObject(bool $asObject = true)

Returns the eZContentObjectVersionObject of the current node

Parameters

bool $asObject

Return Value

eZContentObjectVersion|array|bool

at line 5814
public string urlAlias()

Returns the node's url alias

Return Value

string

at line 5856
public string url()

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

Return Value

string

at line 5871
public string|bool|string|null classIdentifier()

Returns the node's class identifier

Return Value

string|bool|string|null

at line 5887
public string|null className()

Returns the node's class name

Return Value

string|null

at line 5904
public int|null classIsContainer()

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

Return Value

int|null

at line 5921
public string hiddenInvisibleString()

Returns combined string representation of both "ishidden" and "isinvisible" attributes

Return Value

string

at line 5932
public string hiddenStatusString()

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

Return Value

string

at line 6201
public string currentLanguage()

Returns the node's current language

Return Value

string

at line 6211
public setCurrentLanguage(string $languageCode)

Sets the current node's language to $languageCode

Parameters

string $languageCode

at line 6246
public string availableClassesJsArray()

Returns available classes as Js array.

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

Return Value

string

at line 6401
public bool 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.

Return Value

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