Ejemplo n.º 1
0
 /**
  * Populates the sidebar and sets the provided view to the response
  * @param zibo\admin\view\BaseView $view System view to render
  * @param array $actions Array with the URL of the action as key and the label as value
  * @return null
  */
 private function setView(BaseView $view, array $actions)
 {
     $translator = $this->getTranslator();
     $actions[$this->request->getBasePath() . '/clearCache'] = self::TRANSLATION_CLEAR_CACHE;
     $actions[$this->request->getBasePath() . '/reindexFileBrowser'] = self::TRANSLATION_REINDEX_FILE_BROWSER;
     $view->setPageTitle($translator->translate(self::TRANSLATION_TITLE));
     $sidebar = $view->getSidebar();
     $sidebar->setInformation($translator->translate(self::TRANSLATION_DESCRIPTION));
     foreach ($actions as $url => $label) {
         $sidebar->addAction($url, $translator->translate($label));
     }
     $this->response->setView($view);
 }