public function addModuleSubmodules(eModule $eModule, $eSubmodules)
 {
     $data_module = new Data_App_Module_Module();
     $data_module->setModule($eModule);
     $data_module->addSubmodules($eSubmodules);
     $this->_modules_submodules[] = $data_module;
 }
 public function mvcjs()
 {
     $this->load->file('application/modules/app/system_module/data/module_data.php');
     $data_module = new Data_App_Module_Module();
     $data_permission = new Data_App_Module_Permission();
     $params = array('link' => $this->link, 'linkx' => $this->linkx, 'data_module_default' => $data_module->toArray(), 'data_permission_default' => $data_permission->toArray());
     Helper_App_JS::showMVC('system_module', $params);
 }
 private function saveModule()
 {
     $this->load->file('application/modules/app/system_module/data/module_data.php');
     $resAjax = new Response_Ajax();
     $form_data = new Data_App_Module_Module(TRUE);
     $dataError = NULL;
     try {
         if (!$form_data->isValid($dataError)) {
             $resAjax->data(array('module_error' => $dataError->toArray()));
             throw new Exception('Debe ingresar la información en todos los campos');
         }
         $eModule = $form_data->getModuleEntity();
         $ePermissions = $form_data->getPermissionEntities();
         $oBus = Business_App_Module::save($eModule, $ePermissions);
         if (!$oBus->isSuccess()) {
             throw new Exception($oBus->message());
         }
         $form_data->reset();
         $resAjax->isSuccess(TRUE);
         $resAjax->message('Guardado exitosamente');
     } catch (Exception $e) {
         $resAjax->isSuccess(FALSE);
         $resAjax->message($e->getMessage());
     }
     echo $resAjax->toJsonEncode();
 }