本文整理汇总了PHP中CMbDT::timeCountIntervals方法的典型用法代码示例。如果您正苦于以下问题:PHP CMbDT::timeCountIntervals方法的具体用法?PHP CMbDT::timeCountIntervals怎么用?PHP CMbDT::timeCountIntervals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMbDT
的用法示例。
在下文中一共展示了CMbDT::timeCountIntervals方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: min
$plage->multicountOperations();
$nbIntervNonPlacees += $plage->_count_operations - $plage->_count_operations_placees;
$plage->loadAffectationsPersonnel();
$plage->fin = min($plage->fin, $max);
$plage->debut = max($plage->debut, $min);
$plage->updateFormFields();
$plage->makeView();
if ($plage->debut >= $plage->fin) {
unset($listPlages[$keyDate][$plage->_id]);
}
}
// Remplissage du tableau de visualisation
foreach ($listPlages[$keyDate] as $plage) {
$plage->debut = CMbDT::timeGetNearestMinsWithInterval($plage->debut, CPlageOp::$minutes_interval);
$plage->fin = CMbDT::timeGetNearestMinsWithInterval($plage->fin, CPlageOp::$minutes_interval);
$plage->_nbQuartHeure = CMbDT::timeCountIntervals($plage->debut, $plage->fin, "00:" . CPlageOp::$minutes_interval . ":00");
for ($time = $plage->debut; $time < $plage->fin; $time = CMbDT::time("+" . CPlageOp::$minutes_interval . " minutes", $time)) {
$affichages["{$keyDate}-{$time}"] = "full";
}
$affichages["{$keyDate}-{$plage->debut}"] = $plage->_id;
}
// Ajout des interventions hors plage
foreach ($horsPlages as $_op) {
if ($_op->salle_id) {
$affichages["{$keyDate}-HorsPlage"][$_op->_id] = $_op;
}
}
}
//Création du template
$smarty = new CSmartyDP();
$smarty->assign("listPlages", $listPlages);
示例2: array
$plage->loadRefsFwd(true);
$function_id = $plage->_ref_chir->function_id;
$plage->loadRefsConsultations(false, true, true);
$plage->loadFillRate();
$plage->_ref_chir->loadRefFunction();
for ($i = 0; $i < $plage->_total; $i++) {
$minutes = $plage->_freq * $i;
$listPlace[$i]["time"] = CMbDT::time("+ {$minutes} minutes", $plage->debut);
$listPlace[$i]["consultations"] = array();
}
foreach ($plage->_ref_consultations as $keyConsult => $valConsult) {
$consultation =& $plage->_ref_consultations[$keyConsult];
$consultation->loadRefPatient();
// Chargement de la categorie
$consultation->loadRefCategorie();
$keyPlace = CMbDT::timeCountIntervals($plage->debut, $consultation->heure, $plage->freq);
if ($keyPlace < 0) {
$listBefore[$keyPlace] =& $consultation;
}
if ($consultation->heure >= $plage->fin) {
$listAfter[$keyPlace] =& $consultation;
}
for ($i = 0; $i < $consultation->duree; $i++) {
if (isset($listPlace[$keyPlace + $i])) {
$listPlace[$keyPlace + $i]["consultations"][] =& $consultation;
}
}
}
// Utilisation des prises de rdv
// Pour ceux de la même fonction
$user = new CMediusers();
示例3: updateFormFields
/**
* @see parent::updateFormFields()
*/
function updateFormFields()
{
parent::updateFormFields();
$this->_total = CMbDT::timeCountIntervals($this->debut, $this->fin, $this->freq);
if ($this->freq == "1:00:00" || $this->freq == "01:00:00") {
$this->_freq = "60";
} else {
$this->_freq = substr($this->freq, 3, 2);
$this->_freq_minutes = CMbDT::minutesRelative("00:00:00", $this->freq);
}
}