コード例 #1
0
 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';
 }
コード例 #2
0
ファイル: items.php プロジェクト: 3D-I/phpBB-ext-sitemaker
 public function update_items($menu_id, array $items)
 {
     return $this->tree->set_sql_where($this->get_sql_where($menu_id))->update_tree($items);
 }
コード例 #3
0
 public function reorder_items($menu_id)
 {
     return $this->tree->set_sql_where($this->get_sql_where($menu_id))->regenerate_left_right_ids(1);
 }