method fullSoptions documentation in bbn\Appui\Option

Returns an array of full options arrays for a given grandparent

Example

X::dump($opt->fullSoptions(12)); /* array [ ['id' => 21, 'id_parent' => 20, 'title' => "My option 21", 'myProperty' => "78%"], ['id' => 22, 'id_parent' => 20, 'title' => "My option 22", 'myProperty' => "26%"], ['id' => 25, 'id_parent' => 20, 'title' => "My option 25", 'myProperty' => "50%"], ['id' => 27, 'id_parent' => 20, 'title' => "My option 27", 'myProperty' => "40%"], ['id' => 31, 'id_parent' => 30, 'title' => "My option 31", 'myProperty' => "88%"], ['id' => 32, 'id_parent' => 30, 'title' => "My option 32", 'myProperty' => "97%"], ['id' => 35, 'id_parent' => 30, 'title' => "My option 35", 'myProperty' => "12%"], ['id' => 37, 'id_parent' => 30, 'title' => "My option 37", 'myProperty' => "4%"] ] function($code = NULL) { if (bbn\Str::isUid($id = $this->fromCode(\func_get_args()))) { $r = []; if ($ids = $this->items($id)) { foreach ($ids as $id){ $o = $this->fullOptions($id); if (\is_array($o)) { $r = X::mergeArrays($r, $o); } } } return $r; } return null; }

Returns an array of full options arrays 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.