PHP Class Xpressengine\Support\Tree\Tree

Author: XE Developers ([email protected])
Inheritance: implements ArrayAcces\ArrayAccess, implements JsonSerializabl\JsonSerializable
Afficher le fichier Open project: xpressengine/xpressengine

Protected Properties

Свойство Type Description
$rawNodes Illuminate\Support\Collection NodeInterface[]
$treeNodes Illuminate\Support\Collection NodeInterface[]

Méthodes publiques

Méthode Description
__construct ( Xpressengine\Support\Tree\NodeInterface[] $rawNodes = [] )
add ( Xpressengine\Support\Tree\NodeInterface $node ) Adds a node to this node
getNodes ( ) : Collection getRawNodes
getTreeNodes ( ) : Collection getTree
jsonSerialize ( ) : mixed (PHP 5 >= 5.4.0)
Specify data which should be serialized to JSON
make ( Xpressengine\Support\Tree\NodeInterface[] $rawNodes = [] ) : static Make Tree instance
offsetExists ( mixed $offset ) : boolean Implementation of ArrayAccess offsetExists() Whether a offset exists
offsetGet ( mixed $offset ) : mixed Implementation of ArrayAccess offsetGet() Offset to retrieve
offsetSet ( mixed $offset, mixed $value ) : void Implementation of ArrayAccess offsetSet() Offset to set
offsetUnset ( mixed $offset ) : void Implementation of ArrayAccess offsetUnset() Offset to unset
size ( ) : integer size of Tree Collection nodes

Méthodes protégées

Méthode Description
arrange ( ) : void Arrange From Raw nodes to Menu Tree nodes
fullSort ( array $items = [] ) : array sort all nodes
sort ( Xpressengine\Support\Tree\NodeInterface[] $items = [] ) : array sort node tree

Method Details

__construct() public méthode

public __construct ( Xpressengine\Support\Tree\NodeInterface[] $rawNodes = [] )
$rawNodes Xpressengine\Support\Tree\NodeInterface[] nodes

add() public méthode

Adds a node to this node
public add ( Xpressengine\Support\Tree\NodeInterface $node )
$node Xpressengine\Support\Tree\NodeInterface nodes

arrange() protected méthode

Arrange From Raw nodes to Menu Tree nodes
protected arrange ( ) : void
Résultat void

fullSort() protected méthode

sort all nodes
protected fullSort ( array $items = [] ) : array
$items array nodes
Résultat array

getNodes() public méthode

getRawNodes
public getNodes ( ) : Collection
Résultat Illuminate\Support\Collection NodeInterface[]

getTreeNodes() public méthode

getTree
public getTreeNodes ( ) : Collection
Résultat Illuminate\Support\Collection

jsonSerialize() public méthode

(PHP 5 >= 5.4.0)
Specify data which should be serialized to JSON
public jsonSerialize ( ) : mixed
Résultat mixed data which can be serialized by json_encode, which is a value of any type other than a resource.

make() public static méthode

Make Tree instance
public static make ( Xpressengine\Support\Tree\NodeInterface[] $rawNodes = [] ) : static
$rawNodes Xpressengine\Support\Tree\NodeInterface[] nodes
Résultat static

offsetExists() public méthode

Implementation of ArrayAccess offsetExists() Whether a offset exists
public offsetExists ( mixed $offset ) : boolean
$offset mixed array access offset
Résultat boolean true on success or false on failure.

offsetGet() public méthode

Implementation of ArrayAccess offsetGet() Offset to retrieve
public offsetGet ( mixed $offset ) : mixed
$offset mixed array access offset
Résultat mixed Can return all value types.

offsetSet() public méthode

Implementation of ArrayAccess offsetSet() Offset to set
public offsetSet ( mixed $offset, mixed $value ) : void
$offset mixed array access offset
$value mixed array access value
Résultat void

offsetUnset() public méthode

Implementation of ArrayAccess offsetUnset() Offset to unset
public offsetUnset ( mixed $offset ) : void
$offset mixed array access offset
Résultat void

size() public méthode

size of Tree Collection nodes
public size ( ) : integer
Résultat integer

sort() protected méthode

sort node tree
protected sort ( Xpressengine\Support\Tree\NodeInterface[] $items = [] ) : array
$items Xpressengine\Support\Tree\NodeInterface[] nodes
Résultat array

Property Details

$rawNodes protected_oe property

NodeInterface[]
protected Collection,Illuminate\Support $rawNodes
Résultat Illuminate\Support\Collection

$treeNodes protected_oe property

NodeInterface[]
protected Collection,Illuminate\Support $treeNodes
Résultat Illuminate\Support\Collection