예제 #1
0
파일: cmd.class.php 프로젝트: jimibi/core
 public function getUsedBy()
 {
     $return = array();
     $return['cmd'] = self::searchConfiguration('#' . $this->getId() . '#');
     $return['eqLogic'] = eqLogic::searchConfiguration('#' . $this->getId() . '#');
     $return['scenario'] = scenario::byUsedCommand($this->getId());
     $return['interact'] = interactDef::byUsedCommand($this->getId());
     return $return;
 }
예제 #2
0
            $dataStore = new dataStore();
            $dataStore->setKey(init('key'));
            $dataStore->setLink_id(init('link_id'));
            $dataStore->setType(init('type'));
        } else {
            $dataStore = dataStore::byId(init('id'));
        }
        if (!is_object($dataStore)) {
            throw new Exception(__('Data store inconnu vérifer l\'id : ', __FILE__) . init('id'));
        }
        $dataStore->setValue(init('value'));
        $dataStore->save();
        ajax::success();
    }
    if (init('action') == 'all') {
        $datastores = utils::o2a(dataStore::byTypeLinkId(init('type')));
        if (init('usedBy') == 1) {
            foreach ($datastores as &$datastore) {
                $datastore['usedBy'] = array('scenario' => array());
                foreach (scenario::byUsedCommand($datastore['key'], true) as $scenario) {
                    $datastore['usedBy']['scenario'][] = $scenario->getHumanName();
                }
            }
        }
        ajax::success($datastores);
    }
    throw new Exception(__('Aucune methode correspondante à : ', __FILE__) . init('action'));
    /*     * *********Catch exeption*************** */
} catch (Exception $e) {
    ajax::error(displayExeption($e), $e->getCode());
}