本文整理汇总了PHP中CMbObject::massLoadRefsNotes方法的典型用法代码示例。如果您正苦于以下问题:PHP CMbObject::massLoadRefsNotes方法的具体用法?PHP CMbObject::massLoadRefsNotes怎么用?PHP CMbObject::massLoadRefsNotes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMbObject
的用法示例。
在下文中一共展示了CMbObject::massLoadRefsNotes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$ljoin["affectation"] = "sejour.sejour_id = affectation.sejour_id";
$where["sejour.entree"] = "<= '{$datetime_max}'";
$where["sejour.sortie"] = " >= '{$datetime_min}'";
if ($service_id == "NP") {
$where["affectation.affectation_id"] = "IS NULL";
$where["sejour.group_id"] = "= '{$group->_id}'";
} else {
$where["affectation.entree"] = "<= '{$datetime_max}'";
$where["affectation.sortie"] = ">= '{$datetime_min}'";
$where["affectation.service_id"] = " = '{$service_id}'";
}
/** @var CSejour[] $sejours */
$sejours = $sejour->loadList($where, null, null, "sejour.sejour_id", $ljoin);
CSejour::massLoadCurrAffectation($sejours, $datetime_avg, $service_id);
CStoredObject::massLoadFwdRef($sejours, "praticien_id");
CMbObject::massLoadRefsNotes($sejours);
CSejour::massLoadNDA($sejours);
/** @var CPatient[] $patients */
$patients = CStoredObject::massLoadFwdRef($sejours, "patient_id");
CPatient::massLoadIPP($patients);
foreach ($sejours as $sejour) {
$patient = $sejour->loadRefPatient();
$sejour->loadRefPraticien();
$sejour->checkDaysRelative($date);
$sejour->loadRefsNotes();
}
$sorter_patient = CMbArray::pluck($sejours, "_ref_patient", "nom");
if ($service_id == "NP") {
array_multisort($sorter_patient, SORT_ASC, $sejours);
} else {
$sorter_affectation = CMbArray::pluck($sejours, "_ref_curr_affectation", "_ref_lit", "_view");
示例2: CPlanningEvent
$event = new CPlanningEvent($_commentaire->_guid, $debut, $duree, $libelle, "#{$_commentaire->color}", true, null, $_commentaire->_guid, false);
$event->type = "commentaire_planning";
$event->draggable = $event->resizable = CCanDo::edit();
$event->plage["id"] = $_commentaire->_id;
if ($can_edit) {
$event->addMenuItem("edit", "Modifier ce commentaire");
$event->addMenuItem("copy", "Copier ce commentaire");
$event->addMenuItem("cancel", "Supprimer ce commentaire");
}
$planning->addEvent($event);
}
}
// Ajout des plages, OK
foreach ($plages_by_salle as $salle_id => $_plages) {
$i = array_search($salle_id, $salles_ids);
CMbObject::massLoadRefsNotes($_plages);
CMbObject::massLoadFwdRef($_plages, "chir_id");
CMbObject::massLoadFwdRef($_plages, "anesth_id");
CMbObject::massLoadFwdRef($_plages, "spec_id");
foreach ($_plages as $_plage) {
$_plage->loadRefsNotes();
$_plage->loadRefChir()->loadRefFunction();
$_plage->loadRefSpec();
$_plage->loadRefAnesth()->loadRefFunction();
$debut = "{$i} " . CMbDT::time($_plage->debut);
$duree = CMbDT::minutesRelative(CMbDT::time($_plage->debut), CMbDT::time($_plage->fin));
//fetch
$smarty = new CSmartyDP("modules/reservation");
$smarty->assign("plageop", $_plage);
$smarty_plageop = $smarty->fetch("inc_planning/libelle_plageop.tpl");
$smarty_plageop = htmlspecialchars_decode(CMbString::htmlEntities($smarty_plageop, ENT_NOQUOTES), ENT_NOQUOTES);
示例3: foreach
// Destinations : plages des autres praticiens
foreach ($listPlages as $key_prat => $infos_by_prat) {
foreach ($listPlages as $key_other_prat => $infos_other_prat) {
if ($infos_by_prat["prat"]->_id != $infos_other_prat["prat"]->_id) {
foreach ($listPlages[$key_other_prat]["plages"] as $key_plage => $other_plage) {
$listPlages[$key_prat]["destinations"][] = $other_plage;
}
}
}
}
$nb_attente = 0;
$nb_a_venir = 0;
$patients_fetch = array();
$heure_min = null;
foreach ($listPlages as $key_prat => $infos_by_prat) {
CMbObject::massLoadRefsNotes($infos_by_prat["plages"]);
foreach ($infos_by_prat["plages"] as $_plage) {
$_plage->loadRefsNotes();
/** @var CPlageconsult $_plage */
$_plage->_ref_chir = $infos_by_prat["prat"];
$_plage->loadRefsConsultations($canceled, $finished);
// Collection par référence susceptible d'être modifiée
$consultations = $_plage->_ref_consultations;
if (!$paid || !$immediate) {
$_consult = new CConsultation();
foreach ($consultations as $_consult) {
if (!$paid) {
$_consult->loadRefsReglements();
if ($_consult->valide == 1 && $_consult->_du_restant_patient == 0) {
unset($consultations[$_consult->_id]);
}