/**
  * @param View $view
  * @param string $content Content to be displayed
  * @return ResponseInterface
  */
 function display(View $view, $content)
 {
     // Display Page
     return $view->render('0_main.tpl/MAIN', ['content' => $content]);
 }
 /**
  * @param AdminPage $renderer
  * @return View
  */
 public function index(AdminPage $renderer)
 {
     // Renderer
     $view = new View($renderer);
     // Content
     $page = $this->detectPage();
     $this->text['page'] = $page['template']->getLang();
     $content = $this->getPageContent($page['file'], $page['template']);
     $leftMenu = $this->getLeftMenu($page['menu']);
     $default_menu = $renderer->render('main.tpl/default_menu', []);
     // display page
     return $view->render('main.tpl/full', ['title' => $page['title'], 'title_short' => StringCutter::cut($this->config->config('title'), 50, '...'), 'version' => $this->config->config('version'), 'virtualhost' => $this->config->config('virtualhost'), 'admin_link_to_page' => $this->text['menu']->get('admin_link_to_page'), 'topmenu' => get_topmenu($page['menu']), 'log_link' => is_authorized() ? 'logout' : 'login', 'log_image' => is_authorized() ? 'logout.gif' : 'login.gif', 'log_text' => is_authorized() ? $this->text['menu']->get("admin_logout_text") : $this->text['menu']->get("admin_login_text"), 'leftmenu' => !empty($leftMenu) ? $leftMenu : $default_menu, 'content' => $content]);
 }