示例#1
0
 public function init($event)
 {
     Sidebar::addItem('settings', __('Paramètres'), ['_name' => 'settings', 'tab' => 'general'], 'fa fa-cogs', 15);
     $general = (new SettingsTab('general'))->setName(__('Général'))->setPosition(1);
     Settings::registerTab($general);
     $name = (new Setting('name'))->setType('varchar')->setTab('general')->setEditable(true)->setAttributes(['label' => __('Titre du site')]);
     $slogan = (new Setting('slogan'))->setType('varchar')->setTab('general')->setEditable(true)->setAttributes(['label' => __('Slogan')]);
     $debug = (new Setting('debug'))->setType('boolean')->setTab('general')->setEditable(true)->setAttributes(['label' => __('Mode débogage')]);
     Settings::registerSetting($name);
     Settings::registerSetting($slogan);
     Settings::registerSetting($debug);
 }
示例#2
0
 public function beforeFilter(Event $event)
 {
     parent::beforeFilter($event);
     $this->createView(AdminView::class);
     Sidebar::addItem('dashboard', __('Tableau de bord'), ['controller' => 'Pages', 'action' => 'dashboard'], 'fa fa-dashboard', 1);
 }