public function getPortNumber($_portNumber)
 {
     return jeenode::byNodeIdAndPortNumber($this->getId(), $_portNumber);
 }
Beispiel #2
0
                         $enable_cmd = array();
                         foreach ($eqLogic_ajax['cmd'] as $cmd_ajax) {
                             $cmd_db = new jeenodeCmd();
                             $cmd_db->setEqLogic_id($eqLogic_db->getId());
                             utils::a2o($cmd_db, $cmd_ajax);
                             $cmd_db->save();
                             $enable_cmd[$cmd_db->getId()] = true;
                         }
                         //suppression des entrées non modifiées.
                         foreach ($eqLogic_db->getCmd() as $cmd_db) {
                             if (!isset($enable_cmd[$cmd_db->getId()])) {
                                 $cmd_db->remove();
                             }
                         }
                     } else {
                         $eqLogic_db = jeenode::byId($eqLogic_ajax['id']);
                         $eqLogic_db->remove();
                     }
                 }
                 foreach ($eqReal_db->getEqLogic() as $eqLogic_db) {
                     if (!isset($enable_eqLogic[$eqLogic_db->getId()])) {
                         $eqLogic_db->remove();
                     }
                 }
                 break;
         }
     }
     ajax::success();
 }
 if (init('action') == 'getJeenodeConf') {
     $jeenodeReal = jeenodeReal::byId(init('jeenodeRealId'));