コード例 #1
0
 /**
  * @see parent::merge()
  */
 function merge($objects = array(), $fast = false)
 {
     $prescriptions = CStoredObject::massLoadBackRefs($objects, "prescription");
     if ($msg = parent::merge($objects, $fast)) {
         return $msg;
     }
     $this->store();
     if (count($prescriptions) > 1) {
         $prescription = new CPrescription();
         $prescription->object_class = $this->_class;
         $prescription->object_id = $this->_id;
         $prescription->type = "traitement";
         if ($msg = $prescription->merge($prescriptions, $fast)) {
             return $msg;
         }
     }
     return null;
 }