PHP 클래스 Xpressengine\Support\Tree\Tree

저자: XE Developers ([email protected])
상속: implements ArrayAcces\ArrayAccess, implements JsonSerializabl\JsonSerializable
파일 보기 프로젝트 열기: xpressengine/xpressengine

보호된 프로퍼티들

프로퍼티 타입 설명
$rawNodes Illuminate\Support\Collection NodeInterface[]
$treeNodes Illuminate\Support\Collection NodeInterface[]

공개 메소드들

메소드 설명
__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

보호된 메소드들

메소드 설명
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

메소드 상세

__construct() 공개 메소드

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

add() 공개 메소드

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

arrange() 보호된 메소드

Arrange From Raw nodes to Menu Tree nodes
protected arrange ( ) : void
리턴 void

fullSort() 보호된 메소드

sort all nodes
protected fullSort ( array $items = [] ) : array
$items array nodes
리턴 array

getNodes() 공개 메소드

getRawNodes
public getNodes ( ) : Collection
리턴 Illuminate\Support\Collection NodeInterface[]

getTreeNodes() 공개 메소드

getTree
public getTreeNodes ( ) : Collection
리턴 Illuminate\Support\Collection

jsonSerialize() 공개 메소드

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

make() 공개 정적인 메소드

Make Tree instance
public static make ( Xpressengine\Support\Tree\NodeInterface[] $rawNodes = [] ) : static
$rawNodes Xpressengine\Support\Tree\NodeInterface[] nodes
리턴 static

offsetExists() 공개 메소드

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

offsetGet() 공개 메소드

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

offsetSet() 공개 메소드

Implementation of ArrayAccess offsetSet() Offset to set
public offsetSet ( mixed $offset, mixed $value ) : void
$offset mixed array access offset
$value mixed array access value
리턴 void

offsetUnset() 공개 메소드

Implementation of ArrayAccess offsetUnset() Offset to unset
public offsetUnset ( mixed $offset ) : void
$offset mixed array access offset
리턴 void

size() 공개 메소드

size of Tree Collection nodes
public size ( ) : integer
리턴 integer

sort() 보호된 메소드

sort node tree
protected sort ( Xpressengine\Support\Tree\NodeInterface[] $items = [] ) : array
$items Xpressengine\Support\Tree\NodeInterface[] nodes
리턴 array

프로퍼티 상세

$rawNodes 보호되어 있는 프로퍼티

NodeInterface[]
protected Collection,Illuminate\Support $rawNodes
리턴 Illuminate\Support\Collection

$treeNodes 보호되어 있는 프로퍼티

NodeInterface[]
protected Collection,Illuminate\Support $treeNodes
리턴 Illuminate\Support\Collection