method treeIds documentation in bbn\Appui\Option

Returns a flat array of all IDs found in a hierarchical structure (except the top one)

The second parameter is private and should be left blank

Example

X::dump($opt->treeIds(12)); // array [12, 21, 22, 25, 27, 31, 32, 35, 37, 40, 41, 42, 44, 45, 43, 46, 47] function($id, &$res = []) { if ($this->check() && $this->exists($id)) { $res[] = $id; if ($its = $this->items($id)) { foreach ($its as $it){ $this->treeIds($it, $res); } } return $res; } return null; }

Returns a flat array of all IDs found in a hierarchical structure (except the top one) BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.