/** * @see parent::check() */ function check() { if ($msg = parent::check()) { return $msg; } // Check unique item $other = new CPackItemExamenLabo(); $other->pack_examens_labo_id = $this->pack_examens_labo_id; $other->examen_labo_id = $this->examen_labo_id; $other->loadMatchingObject(); if ($other->_id && $other->_id != $this->_id) { return "{$this->_class}-unique-conflict"; } return null; }
function loadRefsItemExamenLabo() { $item = new CPackItemExamenLabo(); $ljoin["examen_labo"] = "pack_item_examen_labo.examen_labo_id = examen_labo.examen_labo_id"; $where = array("pack_examens_labo_id" => "= '{$this->pack_examens_labo_id}'"); // Permet d'afficher dans le pack seulement les analyses non obsolètes $where["examen_labo.obsolete"] = " = '0'"; $this->_ref_items_examen_labo = $item->loadList($where, null, null, null, $ljoin); }
/** * @see parent::loadRefsBack() */ function loadRefsBack() { parent::loadRefsBack(); // Chargement des pack items $item = new CPackItemExamenLabo(); $item->examen_labo_id = $this->_id; $this->_ref_items_pack_labo = $item->loadMatchingList(); // Chargement des packs correspondant $this->_ref_packs_labo = array(); foreach ($this->_ref_items_pack_labo as &$item) { $item->loadRefPack(); $pack =& $item->_ref_pack_examens_labo; $this->_ref_packs_labo[$pack->_id] = $pack; } }