method fullOptionsById documentation in bbn\Appui\Option

Returns an id-indexed array of full options arrays for a given parent

Example

X::dump($opt->fullOptionsById(12)); /* array [ 21 => ['id' => 21, 'id_parent' => 12, 'title' => "My option 21", 'myProperty' => "78%"], 22 => ['id' => 22, 'id_parent' => 12, 'title' => "My option 22", 'myProperty' => "26%"], 25 => ['id' => 25, 'id_parent' => 12, 'title' => "My option 25", 'myProperty' => "50%"], 27 => ['id' => 27, 'id_parent' => 12, 'title' => "My option 27", 'myProperty' => "40%"] ] function($code = NULL) { $res = []; if ($opt = $this->fullOptions(\func_get_args())) { $cf = $this->getFields(); foreach ($opt as $o){ $res[$o[$cf['id']]] = $o; } } return $opt === null ? $opt : $res; }

Returns an id-indexed array of full options arrays for a given parent 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.