method rawTree documentation in bbn\Appui\Option

Returns a hierarchical structure as stored in its original form in the database

Example

X::dump($opt->rawTree('77cea323f0ce11e897fd525400007196')); /* array [ 'id' => 12, 'code' => "bbn_ide", 'text' => "BBN's own IDE", 'id_alias' => null, 'value' => "{\"myProperty\":\"My property's value\"}", 'items' => [ [ 'id' => 25, 'code' => "test", 'text' => "Test", 'id_alias' => null, 'value' => "{\"myProperty\":\"My property's value\"}", ], [ 'id' => 26, 'code' => "test2", 'text' => "Test 2", 'id_alias' => null, 'value' => "{\"myProperty\":\"My property's value\"}", 'items' => [ [ 'id' => 42, 'code' => "test8", 'text' => "Test 8", 'id_alias' => null, 'value' => "{\"myProperty\":\"My property's value\"}", ] ] ], ] ] function($code = NULL) { if (bbn\Str::isUid($id = $this->fromCode(\func_get_args()))) { if ($res = $this->rawOption($id)) { if ($its = $this->items($id)) { $res['items'] = []; foreach ($its as $it){ $res['items'][] = $this->rawTree($it); } } return $res; } } return null; }

Returns a hierarchical structure as stored in its original form in the database 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.