method optionsRef documentation in bbn\Appui\Option

Returns each individual option plus the children of options having this as alias.

Example

X::dump($opt->optionsRef(12)); /* array [ [21 => "My option 21"], [22 => "My option 22"], [25 => "My option 25"], [27 => "My option 27"] ] function($code = NULL) { if (bbn\Str::isUid($id = $this->fromCode(\func_get_args()))) { $all = $this->options($id) ?? []; if ($aliases = $this->getAliases($id)) { foreach ($aliases as $a) { if ($tmp = $this->options($a[$this->fields['id']])) { $all = array_merge($all, $tmp); } } } return $all; } return null; }

Returns each individual option plus the children of options having this as alias. 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.