コード例 #1
0
 public function install_menu()
 {
     $this->CI->load->helper('menu');
     foreach ($this->menu as $gid => $menu_data) {
         $this->menu[$gid]['id'] = linked_install_set_menu($gid, $menu_data["action"], $menu_data["name"]);
         linked_install_process_menu_items($this->menu, 'create', $gid, 0, $this->menu[$gid]["items"]);
     }
 }
コード例 #2
0
 public function deinstall_menu()
 {
     $this->CI->load->helper('menu');
     foreach ($this->menu as $gid => $menu_data) {
         if ($menu_data['action'] == 'create') {
             linked_install_set_menu($gid, 'delete');
         } else {
             linked_install_delete_menu_items($gid, $this->menu[$gid]['items']);
         }
     }
 }
コード例 #3
0
 public function deinstall_menu()
 {
     $this->CI->load->model('Menu_model');
     $this->CI->load->helper('menu');
     linked_install_delete_menu_items($menu_gid, $items);
     foreach ($this->menu as $gid => $menu_data) {
         if ($menu_data["action"] == "create") {
             linked_install_set_menu($gid, "delete");
         } else {
             linked_install_delete_menu_items($gid, $this->menu[$gid]["items"]);
         }
     }
 }
コード例 #4
0
ファイル: menu_helper.php プロジェクト: Calit2-UCI/IoT_Map
 function linked_install_delete_menu_items($menu_gid, $items)
 {
     $menu_id = linked_install_set_menu($menu_gid, "none");
     if (!$menu_id) {
         return false;
     }
     if (!empty($items)) {
         foreach ($items as $item_gid => $item_data) {
             if ($item_data["action"] == 'create') {
                 linked_install_set_menu_item($item_gid, $menu_id, "delete");
             }
             if (!empty($items[$item_gid]["items"])) {
                 linked_install_delete_menu_items($menu_gid, $items[$item_gid]["items"]);
             }
         }
     }
     return;
 }
コード例 #5
0
 public function deinstall_menu()
 {
     $this->CI->load->helper('menu');
     foreach ($this->menu as $gid => $menu_data) {
         if ($menu_data['action'] == 'create') {
             linked_install_set_menu($gid, 'delete');
         } else {
             linked_install_delete_menu_items($gid, $this->menu[$gid]['items']);
         }
     }
     if (!empty($this->menu_indicators)) {
         $this->CI->load->model('menu/models/Indicators_model');
         foreach ($this->menu_indicators as $data) {
             $this->CI->Indicators_model->delete_type($data['gid']);
         }
     }
 }