method soptions documentation in bbn\Appui\Option
Returns an id-indexed array of options in the form id => text for a given grandparent
Example
X::dump($opt->soptions(12));
/*
[
21 => "My option 21",
22 => "My option 22",
25 => "My option 25",
27 => "My option 27",
31 => "My option 31",
32 => "My option 32",
35 => "My option 35",
37 => "My option 37"
]
function($code = NULL)
{
if (bbn\Str::isUid($id = $this->fromCode(\func_get_args()))) {
$r = [];
if ($list = $this->items($id)) {
foreach ($list as $i){
$o = $this->options($i);
if (\is_array($o)) {
$r = X::mergeArrays($r, $o);
}
}
}
return $r;
}
return null;
}
Returns an id-indexed array of options in the form id => text for a given grandparent 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