method getPathArray documentation in bbn\Appui\Option
Returns an array of codes for each option between $id and $root without $root's code
Example
X::dump($opt->getPathArray(48, 12));
// array ["path", "to", "my", "option"]
function(string $id, $root = NULL)
{
if (!isset($root)) {
$root = $this->getDefault();
}
if ($code = $this->code($id)) {
$parts = [];
while ($id && ($id !== $root)){
array_unshift($parts, $code);
if (!($id = $this->getIdParent($id))) {
return null;
}
$code = $this->code($id);
}
return $parts;
}
return null;
}
Returns an array of codes for each option between $id and $root without $root's code 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