/** * Display the overview */ public function displayTask() { foreach ($this->getErrors() as $error) { $this->view->setError($error); } $hubSearch = new SearchEngine(); $hubSearch->getLog(); $this->view->logs = array_slice($hubSearch->logs, -10, 10, true); // Need to fix permissions, www-data must be able to invoke start //$hubSearch->start(); $helper = new Helper(); $dataTypes = $helper->fetchDataTypes($hubSearch->getConfig()); $insertTime = Date::of($hubSearch->lastInsert())->format('relative'); $this->view->status = $hubSearch->ping(); $this->view->lastInsert = $insertTime; $this->view->setLayout('overview'); // Display the view $this->view->display(); }