method sequence documentation in bbn\Appui\Option
Returns an array of id_parents from the selected root to the given id_option
Example
X::dump($opt->parents(48));
// array [0, 12, 25, 48]
X::dump($opt->parents(48, 12));
// array [12, 25, 48]
function(string $id_option, string $id_root = NULL)
{
if (null === $id_root) {
$id_root = self::root_hex;
}
if ($this->exists($id_root) && ($parents = $this->parents($id_option))) {
$res = [$id_option];
foreach ($parents as $p){
array_unshift($res, $p);
if ($p === $id_root) {
return $res;
}
}
}
return null;
}
Returns an array of id_parents from the selected root to the given id_option 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.
© 2011-2023
BBN Solutions