TreeCollectionNode

Implements \JsonSerializable

TreeCollection node

package

TreeHelper

subpackage

Tree

Methods

Constructor

__construct(mixed $Element, \TreeCollection $Childrens = null, \TreeCollectionNode $Parent = null) 

Arguments

$Element

mixed

$Childrens

\TreeCollection

Add children

addChildren(\TreeCollectionNode $Children) : \TreeCollectionNode

Arguments

Response

\TreeCollectionNode

Childrens get

getChildrens() : \TreeCollection

Response

\TreeCollection

Element get

getElement() : mixed

Response

mixed

Parent get

getParent() : \TreeCollectionNode

Check if current node has childrens

hasChildrens() : boolean

Response

boolean

Check if current node has parent

hasParent() : boolean

Response

boolean

Returns true if current node is equals to $Node

isEquals(\TreeCollectionNode $Node) : boolean

Arguments

Response

boolean

Json serialization

jsonSerialize() : array

Response

array

Remove children

removeChildren(\TreeCollectionNode $Children) : \TreeCollectionNode

Arguments

Response

\TreeCollectionNode

Childrens set

setChildrens(\TreeCollection $Childrens = null) : \TreeCollectionNode

Arguments

$Childrens

\TreeCollection

Response

\TreeCollectionNode

Element set

setElement(mixed $Element) : \TreeCollection

Arguments

$Element

mixed

Response

\TreeCollection

Parent set

setParent(\TreeCollectionNode $Parent = null) : \TreeCollectionNode

Arguments

Response

\TreeCollectionNode

Properties

Parent node

_Parent : \TreeCollectionNode
var

Type(s)

\TreeCollectionNode

Children tree

_Childrens : \TreeCollection
var

Type(s)

\TreeCollection

Element

_Element : mixed
var

Type(s)

mixed