コード例 #1
0
ファイル: HtmlServiceProvider.php プロジェクト: phroggyy/html
 /**
  * Register the Menu Generator instance
  */
 protected function registerMenuGenerator()
 {
     $this->app->bind('menu', function ($app) {
         $this->loadConfigurationOptions();
         $menu = new MenuGenerator($app['url'], $app['config'], $this->getTheme());
         if ($this->options['control_access']) {
             $menu->setAccessHandler($app[AccessHandler::class]);
         }
         if ($this->options['translate_texts']) {
             $menu->setLang($app['translator']);
         }
         return $menu;
     });
 }
コード例 #2
0
ファイル: _ide_helper.php プロジェクト: VictorAvelar/sfg
 /**
  * Set the AccessHandler implementation
  *
  * @param \Styde\Html\Menu\AccessHandler $accessHandler
  * @static 
  */
 public static function setAccessHandler($accessHandler)
 {
     return \Styde\Html\Menu\MenuGenerator::setAccessHandler($accessHandler);
 }