method findPermissions documentation in bbn\Appui\Option

Returns an array of _permissions_ from origin $id

Example

X::dump($opt->findPermissions()); /* Returns a full tree of permissions for all options array [] function($id = NULL, $deep = false) { if ($this->check()) { if (\is_null($id)) { $id = $this->default; } $cfg = $this->getCfg($id); if (!empty($cfg['permissions'])) { $perms = []; if ($opts = $this->fullOptionsCfg($id)) { foreach ($opts as $opt){ $o = [ 'icon' => $opt[$this->fields['cfg']]['icon'] ?? 'nf nf-fa-cog', 'text' => $opt[$this->fields['text']], 'id' => $opt[$this->fields['id']] ]; if ($deep && !empty($opt[$this->fields['cfg']]['permissions'])) { $o['items'] = $this->findPermissions($opt[$this->fields['id']], true); } $perms[] = $o; } } return $perms; } } return null; }

Returns an array of _permissions_ from origin $id 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.