getTabs()->add($action, array( 'title' => ucfirst($action), 'url' => Url::fromPath( 'list/' . str_replace(' ', '', $action) ) ))->activate($action); } /** * Display the application log */ public function applicationlogAction() { $this->addTitleTab('application log'); $config_ini = IcingaConfig::app()->toArray(); if (!in_array('logging', $config_ini) || ( in_array('type', $config_ini['logging']) && $config_ini['logging']['type'] === 'file' && in_array('target', $config_ini['logging']) && file_exists($config_ini['logging']['target']) ) ) { $resource = ResourceFactory::create('logfile'); $this->view->logData = $resource->select()->order('DESC')->paginate(); } else { $this->view->logData = null; } } }