/**
  * Show admin bar
  */
 public function show($route_info)
 {
     $this->user->add_lang_ext('blitze/sitemaker', 'block_manager');
     $this->phpbb_container->get('blitze.sitemaker.auto_lang')->add('blocks_admin');
     $route = $route_info['route'];
     $style_id = $route_info['style'];
     $this->get_available_blocks();
     $this->get_startpage_options();
     $this->set_javascript_data($route, $style_id);
     $this->set_assets();
     $this->template->assign_vars(array('S_EDIT_MODE' => true, 'S_ROUTE_OPS' => $this->get_route_options($route), 'S_HIDE_BLOCKS' => $route_info['hide_blocks'], 'S_POSITION_OPS' => $this->get_excluded_position_options($route_info['ex_positions']), 'S_EX_POSITIONS' => join(', ', $route_info['ex_positions']), 'S_STYLE_OPTIONS' => style_select($style_id, true), 'ICON_PICKER' => $this->icons->picker()));
 }
 public function main()
 {
     $menu_id = $this->request->variable('menu_id', 0);
     $menu_mapper = $this->mapper_factory->create('menus', 'menus');
     // Get all menus
     $collection = $menu_mapper->find();
     if ($collection->valid()) {
         $menu = isset($collection[$menu_id]) ? $collection[$menu_id] : $collection->current();
         $menu_id = $menu->get_menu_id();
         foreach ($collection as $entity) {
             $id = $entity->get_menu_id();
             $this->template->assign_block_vars('menu', array('ID' => $id, 'NAME' => $entity->get_menu_name(), 'S_ACTIVE' => $id == $menu_id ? true : false));
         }
     }
     nestedset::load_scripts($this->util);
     $this->util->add_assets(array('js' => array('@blitze_sitemaker/assets/menu/admin.min.js'), 'css' => array('@blitze_sitemaker/assets/menu/admin.min.css')));
     $this->template->assign_vars(array('S_MENU' => true, 'MENU_ID' => $menu_id, 'ICON_PICKER' => $this->icon->picker(), 'T_PATH' => $this->phpbb_root_path, 'UA_MENU_ID' => $menu_id, 'UA_AJAX_URL' => "{$this->phpbb_root_path}app.{$this->php_ext}/menu/admin/"));
     $this->tpl_name = 'acp_menu';
     $this->page_title = 'ACP_MENU';
 }