当前位置: 首页>>代码示例>>PHP>>正文


PHP CMbObject::check方法代码示例

本文整理汇总了PHP中CMbObject::check方法的典型用法代码示例。如果您正苦于以下问题:PHP CMbObject::check方法的具体用法?PHP CMbObject::check怎么用?PHP CMbObject::check使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CMbObject的用法示例。


在下文中一共展示了CMbObject::check方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: check

 /**
  * @see parent::check()
  */
 function check()
 {
     if ($this->fieldModified("content", "")) {
         return "CContentHTML-failed-emptytext";
     }
     return parent::check();
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:10,代码来源:CContentHTML.class.php

示例2: check

 /**
  * @see parent::check()
  */
 function check()
 {
     if ($msg = parent::check()) {
         return $msg;
     }
     $this->completeField("conge_id", "replacer_id");
     $this->loadRefConge();
     if ($this->_ref_conge->user_id == $this->replacer_id) {
         return "{$this->_class}-failed-same_user";
     }
     return null;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:15,代码来源:CReplacement.class.php

示例3: check

 /**
  * @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;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:18,代码来源:CPackItemExamenLabo.class.php

示例4: check

 /**
  * @see parent::check()
  */
 function check()
 {
     if ($msg = parent::check()) {
         return $msg;
     }
     if ($this->hasAncestor($this)) {
         return "Cyclic catalog creation";
     }
     // Checks whether there is a sibling catalogue in the same hierarchy
     $root = $this->getRootCatalogue();
     foreach ($this->getSiblings() as $_sibling) {
         $_root = $_sibling->getRootCatalogue();
         if ($root->_id == $_root->_id) {
             return "CCatalogue-sibling-conflict ({$this->identifiant})";
         }
     }
     return null;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:21,代码来源:CCatalogueLabo.class.php

示例5: check

 /**
  * @see parent::check()
  */
 function check()
 {
     if ($msg = parent::check()) {
         return $msg;
     }
     // Check unique affectation_id except absence (leave / return from leave)
     if ($this->movement_type != "AABS" && $this->movement_type != "RABS") {
         $movement = new self();
         $this->completeField("affectation_id");
         $movement->movement_type = $this->movement_type;
         $movement->affectation_id = $this->affectation_id;
         $movement->cancel = 0;
         $movement->loadMatchingObject();
         if ($this->affectation_id && $movement->_id && $this->_id != $movement->_id) {
             return CAppUI::tr("{$this->_class}-failed-affectation_id") . " : {$this->affectation_id}";
         }
     }
     return null;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:22,代码来源:CMovement.class.php

示例6: check

 /**
  * @see parent::check()
  */
 function check()
 {
     parent::check();
     $this->completeField("domain_id", "object_class", "group_id");
     // Recherche si on a pas déjà un établissement du domaine pour un type d'objet différent
     $ljoin = array("domain" => "domain.domain_id = group_domain.domain_id");
     $group_domain = new CGroupDomain();
     // Recherche si on a un établissement du domaine déjà en master avec le même type d'objet et le même établissement
     if ($this->master) {
         $where = array("master" => " = '1'", "object_class" => " = '{$this->object_class}'", "group_id" => " = '{$this->group_id}'", "domain.active" => " = '1'");
         if ($group_domain->countList($where, null, $ljoin) > 0) {
             return "CGroupDomain-master_already_exist";
         }
     }
     $where = array("domain.domain_id" => " = '{$this->domain_id}'", "incrementer_id" => "IS NOT NULL", "object_class" => " != '{$this->object_class}'", "domain.active" => " = '1'");
     if ($group_domain->countList($where, null, $ljoin) > 0) {
         return "CGroupDomain-object_class_already_exist";
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:22,代码来源:CGroupDomain.class.php

示例7: check

 /**
  * @see parent::check()
  */
 function check()
 {
     if ($msg = parent::check()) {
         return $msg;
     }
     $this->completeField("operation_id", "sejour_maman_id", "grossesse_id");
     // Operation has to be part of sejour
     if ($this->operation_id) {
         $operation = $this->loadRefOperation();
         if ($operation->sejour_id != $this->sejour_maman_id) {
             return "failed-operation-notin-sejour";
         }
     }
     // Sejour has to be part of grossesse
     $sejour = $this->loadRefSejourMaman();
     if ($sejour->grossesse_id != $this->grossesse_id) {
         return "failed-sejour-maman-notin-grossesse";
     }
     return null;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:23,代码来源:CNaissance.class.php

示例8: check

 /**
  * @see parent::check()
  */
 function check()
 {
     if ($msg = parent::check()) {
         return $msg;
     }
     // Check unique item
     $other = new CPrescriptionLaboExamen();
     $clone = null;
     if ($this->_id) {
         $clone = new CPrescriptionLaboExamen();
         $clone->load($this->_id);
     } else {
         $clone = $this;
     }
     $other->prescription_labo_id = $clone->prescription_labo_id;
     $other->examen_labo_id = $clone->examen_labo_id;
     $other->loadMatchingObject();
     if ($other->_id && $other->_id != $this->_id) {
         return "{$this->_class}-unique-conflict";
     }
     // Check prescription status
     $clone->loadRefPrescription();
     $clone->_ref_prescription_labo->loadRefsBack();
     if ($clone->_ref_prescription_labo->_status >= CPrescriptionLabo::VALIDEE) {
         return "Prescription déjà validée";
     }
     // Get the analysis to check resultat
     if (!$this->examen_labo_id) {
         if (!$clone) {
             $clone = new CPrescriptionLaboExamen();
             $clone->load($this->_id);
         }
         $this->examen_labo_id = $clone->examen_labo_id;
     }
     // Check resultat according to type
     $this->loadRefExamen();
     $resultTest = CMbFieldSpecFact::getSpec($this, "resultat", $this->_ref_examen_labo->type);
     return $resultTest->checkPropertyValue($this);
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:42,代码来源:CPrescriptionLaboExamen.class.php

示例9: check

 function check()
 {
     $msg = parent::check();
     if (!$msg) {
         $where = array();
         $where["date"] = $this->_spec->ds->prepare("= %", $this->date);
         $where["affectation_id"] = $this->_spec->ds->prepare("= %", $this->affectation_id);
         $where["typerepas_id"] = $this->_spec->ds->prepare("= %", $this->typerepas_id);
         if ($this->repas_id) {
             $where["repas_id"] = $this->_spec->ds->prepare("!= %", $this->repas_id);
         }
         $select = "count(`" . $this->_spec->key . "`) AS `total`";
         $sql = new CRequest();
         $sql->addTable($this->_spec->table);
         $sql->addSelect($select);
         $sql->addWhere($where);
         $nbRepas = $this->_spec->ds->loadResult($sql->makeSelect());
         if ($nbRepas) {
             $msg .= "Un repas a déjà été créé, vous ne pouvez pas en créer un nouveau.";
         }
     }
     return $msg;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:23,代码来源:CRepas.class.php

示例10: check

 /**
  * @see parent::check()
  */
 function check()
 {
     if ($msg = parent::check()) {
         return $msg;
     }
     /* Check if the object has been properly loaded,
        to avoid blocking the merges of a context (CSejour, COperation, CPatient, CConsultation) */
     if ($this->_id && $this->datetime) {
         // Verifie si au moins une des valeurs est remplie
         $ok = false;
         foreach (CConstantesMedicales::$list_constantes as $const => $params) {
             if ($const[0] == '_') {
                 continue;
             }
             $this->completeField($const);
             if (array_key_exists('formfields', $params)) {
                 foreach ($params['formfields'] as $_formfield) {
                     if ($this->{$_formfield} !== "" && $this->{$_formfield} !== null) {
                         $ok = true;
                         break 2;
                     }
                 }
             } elseif ($this->{$const} !== "" && $this->{$const} !== null) {
                 $ok = true;
                 break;
             }
         }
         if (!$ok) {
             return CAppUI::tr("CConstantesMedicales-min_one_constant");
         }
     }
     return null;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:36,代码来源:CConstantesMedicales.class.php

示例11: check

 /**
  * @see parent::check()
  */
 function check()
 {
     if ($msg = parent::check()) {
         return $msg;
     }
     if ($msg = $this->checkCollisions()) {
         return $msg;
     }
     return null;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:13,代码来源:CAffectation.class.php

示例12: check

 /**
  * @see parent::check()
  */
 function check()
 {
     if ($msg = parent::check()) {
         return $msg;
     }
     //a message flag as sent cannot be archived
     if ($this->sent && $this->archived) {
         return "CUserMail-msg-AMessageSentCannotBeArchived";
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:13,代码来源:CUserMail.class.php

示例13: check

 /**
  * @see parent::check()
  */
 function check()
 {
     if ($msg = parent::check()) {
         return $msg;
     }
     if ($this->fieldModified("host_class")) {
         $count_constraints = $this->countBackRefs("constraints");
         if ($count_constraints > 0) {
             return "Impossible de changer le type d'objet hôte de ce formulaire car il possède {$count_constraints} contrainte(s)";
         }
     }
     return null;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:16,代码来源:CExClassEvent.class.php

示例14: check

 /**
  * @see parent::check()
  */
 function check()
 {
     if ($this->_forwardRefMerging) {
         return null;
     }
     // Vérouillage d'un événement traité
     $this->completeField("realise", "annule", "nb_patient_seance", "nb_intervenant_seance");
     $this->_traite = $this->realise || $this->annule;
     if ($this->_traite && !$this->_traitement) {
         return "Evénément déjà traité (réalisé ou annulé)";
     }
     // Evénement dans les bornes du séjour
     $this->completeField("sejour_id", "debut");
     $sejour = $this->loadRefSejour();
     // Vérifier seulement les jours car les sorties peuvent être imprécises pour les hospit de jours
     if ($sejour->_id && $this->debut) {
         $date_debut = CMbDT::date($this->debut);
         $date_entree = CMbDT::date(CMbDT::date($sejour->entree));
         $date_sortie = CMbDT::date(CMbDT::date($sejour->sortie));
         if (!CMbRange::in($date_debut, $date_entree, $date_sortie)) {
             return "Evenement SSR en dehors des dates du séjour";
         }
     }
     // Cas de la réalisation des événements SSR
     $this->loadRefTherapeute();
     // Si le therapeute n'est pas defini, c'est
     if ($this->therapeute_id) {
         $therapeute = $this->_ref_therapeute;
     } else {
         // Chargement du therapeute de la seance
         $evt_seance = new CEvenementSSR();
         $evt_seance->load($this->seance_collective_id);
         $evt_seance->loadRefTherapeute();
         $therapeute = $evt_seance->_ref_therapeute;
     }
     if ($this->fieldModified("realise")) {
         // Si le thérapeute n'a pas d'identifiant CdARR
         if (!$therapeute->code_intervenant_cdarr) {
             return CAppUI::tr("CMediusers-code_intervenant_cdarr-none");
         }
         $therapeute->loadRefIntervenantCdARR();
         $code_intervenant_cdarr = $therapeute->_ref_intervenant_cdarr->code;
         // Création du RHS au besoins
         $rhs = $this->getRHS();
         if (!$rhs->_id) {
             $rhs->store();
         }
         if ($rhs->facture == 1) {
             CAppUI::stepAjax(CAppUI::tr("CRHS.charged"), UI_MSG_WARNING);
         }
         $this->loadView();
         // Complétion de la ligne RHS
         foreach ($this->loadRefsActesCdARR() as $_acte_cdarr) {
             $ligne = new CLigneActivitesRHS();
             $ligne->rhs_id = $rhs->_id;
             $ligne->executant_id = $therapeute->_id;
             $ligne->code_activite_cdarr = $_acte_cdarr->code;
             $ligne->code_intervenant_cdarr = $code_intervenant_cdarr;
             $ligne->loadMatchingObject();
             $ligne->crementDay($this->debut, $this->realise ? "inc" : "dec");
             $ligne->auto = "1";
             $ligne->store();
         }
         foreach ($this->loadRefsActesCsARR() as $_acte_csarr) {
             $ligne = new CLigneActivitesRHS();
             $ligne->rhs_id = $rhs->_id;
             $ligne->executant_id = $therapeute->_id;
             $ligne->code_activite_csarr = $_acte_csarr->code;
             $ligne->code_intervenant_cdarr = $code_intervenant_cdarr;
             $ligne->modulateurs = $_acte_csarr->modulateurs;
             $ligne->phases = $_acte_csarr->phases;
             $ligne->nb_patient_seance = $this->nb_patient_seance;
             $ligne->nb_intervenant_seance = $this->nb_intervenant_seance;
             $ligne->loadMatchingObject();
             $ligne->crementDay($this->debut, $this->realise ? "inc" : "dec");
             $ligne->auto = "1";
             $ligne->store();
         }
     }
     return parent::check();
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:84,代码来源:CEvenementSSR.class.php

示例15: check

 /**
  * @see parent::check()
  */
 function check()
 {
     if ($msg = $this->checkExecutionLine()) {
         return $msg;
     }
     return parent::check();
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:10,代码来源:CCronJob.class.php


注:本文中的CMbObject::check方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。