Download the PHP package fomvasss/tree-builder without Composer
On this page you can find all versions of the php package fomvasss/tree-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download fomvasss/tree-builder
More information about fomvasss/tree-builder
Files in fomvasss/tree-builder
Download fomvasss/tree-builder
More information about fomvasss/tree-builder
Files in fomvasss/tree-builder
Vendor fomvasss
Package tree-builder
Short Description The library for building a tree array structure
License MIT
Homepage https://github.com/fomvasss/tree-builder
Package tree-builder
Short Description The library for building a tree array structure
License MIT
Homepage https://github.com/fomvasss/tree-builder
Please rate this library. Is it a good library?
Informations about the package tree-builder
Tree builder
The class for building tree array structure
Installation
Run:
Usage
Create your own class for your item that inherits Fomvasss\TreeBuilder\TreeBuilder
class.
For example, we create CommentTreeItem
and UserTreeItem
:
In controller we can use next methods:
getTree(array $items)
- get tree structuregetItem(array $item)
- get one itemgetItems(array $items)
- get array itemshideDepth()
- do not show fielddepth
in result arraysetExceptKeys(array $keys)
- set except keys for result array
__! Your array must have id
& parent_id
keys for building tree__
Example json results:
All versions of tree-builder with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5.9
The package fomvasss/tree-builder contains the following files
Loading the files please wait ....