new Tab( array( 'title' => t('Adjust the preferences of Icinga Web 2 according to your needs'), 'label' => t('Preferences'), 'url' => Url::fromPath('/preference') ) ) ); } /** * Show form to adjust user preferences */ public function indexAction() { $config = Config::app()->getSection('global'); $user = $this->getRequest()->getUser(); $form = new PreferenceForm(); $form->setPreferences($user->getPreferences()); if ($config->get('config_backend', 'ini') !== 'none') { $form->setStore(PreferencesStore::create(new ConfigObject(array( 'store' => $config->get('config_backend', 'ini'), 'resource' => $config->config_resource )), $user)); } $form->handleRequest(); $this->view->form = $form; $this->getTabs()->activate('preferences'); } }