class Node extends ConcreteObject implements ObjectInterface, AssignableObjectInterface (View source)

Traits

Properties

$error from ConcreteObject
protected $childNodes
protected $childNodesLoaded
protected $treeNodeIsSelected
protected $tree

Methods

loadError($error)

No description

isError()

No description

getError()

No description

setPropertiesFromArray($arr)

No description

static 
camelcase($file)

No description

static 
uncamelcase($string)

No description

assignPermissions($userOrGroup, $permissions = [], $accessType = Key::ACCESS_TYPE_INCLUDE, $cascadeToChildren = true)

No description

loadDetails()

No description

string
getTreeNodeDisplayName(string $format = 'html')

Returns the display name for this tree node (localized and escaped accordingly to $format).

deleteDetails()

No description

getTreeNodeTypeName()

No description

getTreeNodeTypeDisplayName($format = 'html')

No description

getListFormatter()

No description

getTreeNodeID()

No description

getTreeNodeParentID()

No description

getTreeNodeParentObject()

No description

setTree(Tree $tree)

No description

getDateLastModified()

No description

getDateCreated()

No description

getTreeObject()

No description

setTreeNodeName($treeNodeName)

No description

getTreeNodeName()

No description

getTreeID()

No description

getTreeNodeTypeID()

No description

getTreeNodeTypeObject()

No description

getTreeNodeTypeHandle()

No description

Node[]
getChildNodes()

Return the list of child nodes (call populateDirectChildrenOnly() before calling this method).

getTreeNodePermissionsNodeID()

No description

getTreeNodeChildCount()

No description

getChildNodesLoaded()

No description

transformNode(mixed $treeNodeType)

Transforms a node to another node.

getTreeNodeParentArray()

Returns an array of all parents of this tree node.

selectChildrenNodesByID(int $nodeID, bool $loadMissingChildren = false)

Recursively searches for a children node and marks it as selected.

getTreeNodeMenu()

No description

getJSONObject()

No description

getTreeNodeJSON()

No description

export(SimpleXMLElement $x)

No description

duplicate($parent = false)

No description

getTreeNodeDisplayPath()

No description

setPermissionsToOverride()

No description

getAllChildNodeIDs()

No description

setTreeNodeTreeID($treeID)

No description

checkMove(Node $newParent)

Check if this node can be moved under another parent.

move(Node $newParent)

Move this node under another node.

updateDateModified()

Update the Date Modified to the current time.

saveChildOrder($orderedIDs)

No description

static Node
add(Node|null|false $parent = false)

Add a new node.

static 
importNode(SimpleXMLElement $sx, $parent = false)

No description

importChildren(SimpleXMLElement $sx)

No description

populateChildren()

No description

populateDirectChildrenOnly()

No description

delete()

No description

static 
getByID($treeNodeID)

No description

exportTranslations(Translations $translations)

No description

static 
getNodeByName($name)

No description

getHierarchicalNodesOfType($treeNodeTypeHandle, $level = 1, $returnNodeObjects = false, $includeThisNode = true, $maxDepth = null)

No description

static 
getNodesOfType($treeNodeTypeHandle)

No description

duplicateChildren(Node $node)

No description

rescanChildrenDisplayOrder()

No description

populateRecursiveNodes($treeNodeTypeID, $nodes, $nodeRow, $level, $returnNodeObjects = false, $includeThisNode = true, $maxDepth = null)

No description

Details

loadError($error)

Parameters

$error

isError()

getError()

setPropertiesFromArray($arr)

Parameters

$arr

static camelcase($file)

Parameters

$file

static uncamelcase($string)

Parameters

$string

assignPermissions($userOrGroup, $permissions = [], $accessType = Key::ACCESS_TYPE_INCLUDE, $cascadeToChildren = true)

Parameters

$userOrGroup
$permissions
$accessType
$cascadeToChildren

abstract loadDetails()

abstract string getTreeNodeDisplayName(string $format = 'html')

Returns the display name for this tree node (localized and escaped accordingly to $format).

Parameters

string $format = 'html' Escape the result in html format (if $format is 'html'). If $format is 'text' or any other value, the display name won't be escaped.

Return Value

string

abstract deleteDetails()

abstract getTreeNodeTypeName()

getTreeNodeTypeDisplayName($format = 'html')

Parameters

$format

getListFormatter()

getPermissionObjectIdentifier()

getTreeNodeID()

getTreeNodeParentID()

getTreeNodeParentObject()

setTree(Tree $tree)

Parameters

Tree $tree

getDateLastModified()

getDateCreated()

getTreeObject()

setTreeNodeName($treeNodeName)

Parameters

$treeNodeName

getTreeNodeName()

getTreeID()

getTreeNodeTypeID()

getTreeNodeTypeObject()

getTreeNodeTypeHandle()

Node[] getChildNodes()

Return the list of child nodes (call populateDirectChildrenOnly() before calling this method).

Return Value

Node[]

overrideParentTreeNodePermissions()

getTreeNodePermissionsNodeID()

getTreeNodeChildCount()

getChildNodesLoaded()

transformNode(mixed $treeNodeType)

Transforms a node to another node.

Parameters

mixed $treeNodeType

getTreeNodeParentArray()

Returns an array of all parents of this tree node.

selectChildrenNodesByID(int $nodeID, bool $loadMissingChildren = false)

Recursively searches for a children node and marks it as selected.

Parameters

int $nodeID ID of the children to be selected
bool $loadMissingChildren if set to true, it will fetch, as needed, the children of the current node, that have not been loaded yet

getTreeNodeMenu()

getJSONObject()

getTreeNodeJSON()

export(SimpleXMLElement $x)

Parameters

SimpleXMLElement $x

duplicate($parent = false)

Parameters

$parent

getTreeNodeDisplayPath()

setChildPermissionsToOverride()

setPermissionsToOverride()

setTreeNodePermissionsToGlobal()

setTreeNodePermissionsToOverride()

getAllChildNodeIDs()

setTreeNodeTreeID($treeID)

Parameters

$treeID

MoveException|null checkMove(Node $newParent)

Check if this node can be moved under another parent.

Parameters

Node $newParent the new parent node

Return Value

MoveException|null return a MoveException in case of problems, null in case of success

move(Node $newParent)

Move this node under another node.

Parameters

Node $newParent The new parent node

Exceptions

MoveException throws a MoveException in case of errors

updateDateModified()

Update the Date Modified to the current time.

saveChildOrder($orderedIDs)

Parameters

$orderedIDs

static Node add(Node|null|false $parent = false)

Add a new node.

Parameters

Node|null|false $parent the parent node

Return Value

Node

static importNode(SimpleXMLElement $sx, $parent = false)

Parameters

SimpleXMLElement $sx
$parent

importChildren(SimpleXMLElement $sx)

Parameters

SimpleXMLElement $sx

populateChildren()

populateDirectChildrenOnly()

delete()

static getByID($treeNodeID)

Parameters

$treeNodeID

exportTranslations(Translations $translations)

Parameters

Translations $translations

static getNodeByName($name)

Parameters

$name

getHierarchicalNodesOfType($treeNodeTypeHandle, $level = 1, $returnNodeObjects = false, $includeThisNode = true, $maxDepth = null)

Parameters

$treeNodeTypeHandle
$level
$returnNodeObjects
$includeThisNode
$maxDepth

static getNodesOfType($treeNodeTypeHandle)

Parameters

$treeNodeTypeHandle

protected duplicateChildren(Node $node)

Parameters

Node $node

protected rescanChildrenDisplayOrder()

protected populateRecursiveNodes($treeNodeTypeID, $nodes, $nodeRow, $level, $returnNodeObjects = false, $includeThisNode = true, $maxDepth = null)

Parameters

$treeNodeTypeID
$nodes
$nodeRow
$level
$returnNodeObjects
$includeThisNode
$maxDepth