Helper for building tree
| package |
TreeHelper |
|---|---|
| subpackage |
View.Helper |
_build(mixed $data, callable|string $getName, callable|string $getChildrens, integer $expandTo, integer $level, string $prefix = '') : string
mixedNode childrens data
callable|stringMust return string node title from initial node data
callable|stringMust return children nodes or null
integerAll nodes from 1 to $expandTo will be expanded initially
integerCurrent node nesting level
stringNumeric dot-separated path from root to current node withoun current node number
stringHtml tree or empty string
_buildAssets(boolean $inline) : string|void
boolean
string|void
_toCallable(callable|string $callback) : callable
| throws |
If callback is not callable nor string |
|---|
callable|string
callable
build(mixed $data, array $options = array()) : string
mixedData for building tree
arrayOptions, can be:
stringHtml tree with scripts and styles (if inline)
helpers : array
| var |
|---|
array
Html : \HtmlHelper
Html helper
\HtmlHelper
Form : \FormHelper
Form helper
\FormHelper