method getMenus documentation in bbn\Appui\Menu

Gets the user's menus list (text-value form)

function($k_text = 'text', $k_value = 'value') { $c = $this->pref->getClassCfg(); $pref =& $this->pref; if (!($id_menus = self::getAppuiOptionId('menus'))) { throw new \Exception("Impossible to find the option for menus"); } if (!($menus = $this->pref->getAll($id_menus))) { return []; throw new \Exception("Impossible to get the menus items"); } return array_map( function ($e) use ($c, $k_text, $k_value, $pref) { return [ $k_text => $e[$c['arch']['user_options']['text']], $k_value => $e[$c['arch']['user_options']['id']], $c['arch']['user_options']['public'] => $e[$c['arch']['user_options']['public']], $c['arch']['user_options']['id_user'] => $e[$c['arch']['user_options']['id_user']], $c['arch']['user_options']['id_group'] => $e[$c['arch']['user_options']['id_group']], 'hasItems' => (bool)count($pref->getBits($e[$c['arch']['user_options']['id']])) ]; }, $menus ); }

Gets the user's menus list (text-value form) 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.