/** * Chargement de la liste des protocoles de DHE de l'utilisateur * * @param string $type type du séjour * * @return CProtocole[] */ function loadProtocoles($type = null) { $this->loadRefFunction(); $functions = array($this->function_id); $this->loadBackRefs("secondary_functions"); foreach ($this->_back["secondary_functions"] as $curr_sec_func) { $functions[] = $curr_sec_func->function_id; } $list_functions = implode(",", $functions); $where = array("protocole.chir_id = '{$this->_id}' OR protocole.function_id IN ({$list_functions})"); if ($type) { $where["type"] = "= '{$type}'"; } $protocole = new CProtocole(); $this->_ref_protocoles = $protocole->loadList($where, "libelle_sejour, libelle, codes_ccam"); }
/** * Load protocole * * @param string $type Type * * @return CProtocole[] */ function loadProtocoles($type = null) { $where = array("function_id" => "= '{$this->_id}'"); if ($type) { $where["type"] = "= '{$type}'"; } $protocole = new CProtocole(); return $this->_ref_protocoles = $protocole->loadList($where, "libelle_sejour, libelle, codes_ccam"); }