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
mixed
Node childrens data
callable|string
Must return string node title from initial node data
callable|string
Must return children nodes or null
integer
All nodes from 1 to $expandTo will be expanded initially
integer
Current node nesting level
string
Numeric dot-separated path from root to current node withoun current node number
string
Html 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
mixed
Data for building tree
array
Options, can be:
string
Html tree with scripts and styles (if inline)
helpers : array
var |
---|
array
Html : \HtmlHelper
Html helper
\HtmlHelper
Form : \FormHelper
Form helper
\FormHelper