Ejemplo n.º 1
0
 /**
  * 
  * @param type $childrenModule
  * @param type $childrenModuleDirectory
  * @throws \Exception
  */
 protected function installChildrenMenu($childrenModule, $childrenModuleDirectory)
 {
     $filejson = $childrenModuleDirectory . '/install/menu.json';
     Informations::deleteMenus($childrenModule['id']);
     if (file_exists($filejson)) {
         $menus = json_decode(file_get_contents($filejson), true);
         if (!is_null($menus)) {
             self::parseMenuArray($childrenModule['id'], $menus);
         } else {
             throw new \Exception('Error while parsing the menu JSON file of the module');
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * 
  */
 public function installMenu()
 {
     $filejson = $this->moduleDirectory . 'install/menu.json';
     Informations::deleteMenus($this->moduleId);
     if (file_exists($filejson)) {
         $menus = json_decode(file_get_contents($filejson), true);
         self::parseMenuArray($this->moduleId, $menus);
     }
 }