Tree
class Tree implements ArrayAccess, JsonSerializable
Class Tree
Properties
protected Collection | $rawNodes | ||
protected Collection | $treeNodes |
Methods
getRawNodes
getTree
Arrange From Raw nodes to Menu Tree nodes
sort all nodes
size of Tree Collection nodes
Implementation of ArrayAccess offsetExists() Whether a offset exists
Implementation of ArrayAccess offsetGet() Offset to retrieve
Implementation of ArrayAccess offsetSet() Offset to set
Implementation of ArrayAccess offsetUnset() Offset to unset
(PHP 5 >= 5.4.0)
Specify data which should be serialized to JSON
Details
at line 45
__construct(NodeInterface[] $rawNodes = array())
at line 64
static Tree
make(NodeInterface[] $rawNodes = array())
Make Tree instance
at line 74
Collection
getNodes()
getRawNodes
at line 84
Collection
getTreeNodes()
getTree
at line 96
$this
add(NodeInterface $node)
Adds a node to this node
at line 117
protected void
arrange()
Arrange From Raw nodes to Menu Tree nodes
at line 141
protected array
fullSort(array $items = array())
sort all nodes
at line 160
protected array
sort(NodeInterface[] $items = array())
sort node tree
at line 179
int
size()
size of Tree Collection nodes
at line 192
boolean
offsetExists(mixed $offset)
Implementation of ArrayAccess offsetExists() Whether a offset exists
at line 205
mixed
offsetGet(mixed $offset)
Implementation of ArrayAccess offsetGet() Offset to retrieve
at line 223
void
offsetSet(mixed $offset, mixed $value)
Implementation of ArrayAccess offsetSet() Offset to set
at line 236
void
offsetUnset(mixed $offset)
Implementation of ArrayAccess offsetUnset() Offset to unset
at line 249
mixed
jsonSerialize()
(PHP 5 >= 5.4.0)
Specify data which should be serialized to JSON