本文整理汇总了PHP中COperation::loadMatchingObject方法的典型用法代码示例。如果您正苦于以下问题:PHP COperation::loadMatchingObject方法的具体用法?PHP COperation::loadMatchingObject怎么用?PHP COperation::loadMatchingObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COperation
的用法示例。
在下文中一共展示了COperation::loadMatchingObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: COperation
if ($_plage->debut <= $time_op && $temps_op <= $_plage->fin) {
$plageOp = $_plage;
break;
}
}
// Recherche d'une intervension existante sinon création
$operation = new COperation();
$operation->sejour_id = $sejour->_id;
$operation->chir_id = $mediuser->_id;
$operation->plageop_id = $plageOp->_id;
$operation->salle_id = $salle->_id;
if (!$operation->plageop_id) {
$operation->date = $date_op;
}
$operation->temp_operation = $temps_op;
$operation->time_operation = $time_op;
$operation->loadMatchingObject();
$operation->libelle = $libelle;
$operation->cote = $cote ? $cote : "inconnu";
if ($msg = $operation->store()) {
CAppUI::stepAjax($msg, UI_MSG_WARNING);
$results["count_erreur"]++;
continue;
}
$results["count_ok"]++;
}
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("results", $results);
$smarty->display("add_operation_csv.tpl");
示例2: updatePlainFields
/**
* @see parent::updatePlainFields()
*/
function updatePlainFields()
{
if (is_array($this->_codes_ccam) && count($this->_codes_ccam)) {
$this->codes_ccam = implode("|", $this->_codes_ccam);
}
if ($this->codes_ccam) {
$this->codes_ccam = strtoupper($this->codes_ccam);
$codes_ccam = explode("|", $this->codes_ccam);
$XPosition = true;
// @TODO: change it to use removeValue
while ($XPosition !== false) {
$XPosition = array_search("-", $codes_ccam);
if ($XPosition !== false) {
array_splice($codes_ccam, $XPosition, 1);
}
}
$this->codes_ccam = implode("|", $codes_ccam);
}
if ($this->_time_op !== null) {
$this->temp_operation = $this->_time_op;
}
if ($this->_time_urgence !== null) {
$this->time_operation = $this->_time_urgence;
} elseif ($this->_horaire_voulu) {
$this->horaire_voulu = $this->_horaire_voulu;
}
$this->completeField('rank', 'plageop_id');
if ($this->_move) {
$op = new COperation();
$op->plageop_id = $this->plageop_id;
switch ($this->_move) {
case 'before':
$op->rank = $this->rank - 1;
if ($op->loadMatchingObject()) {
$op->rank = $this->rank;
$op->store(false);
$this->rank -= 1;
}
break;
case 'after':
$op->rank = $this->rank + 1;
if ($op->loadMatchingObject()) {
$op->rank = $this->rank;
$op->store(false);
$this->rank += 1;
}
break;
case 'out':
$this->rank = 0;
$this->time_operation = '00:00:00';
$this->pause = '00:00:00';
break;
case 'last':
if ($op->loadMatchingObject('rank DESC')) {
$this->rank = $op->rank + 1;
}
break;
default:
}
$this->_reorder_rank_voulu = true;
$this->_move = null;
}
}
示例3: loadRefCurrOperation
/**
* Charge la première internvention du jour
*
* @param datetime $date Datetime de référence
*
* @return COperation
*/
function loadRefCurrOperation($date)
{
if (!$this->_id) {
return $this->_ref_curr_operation = new COperation();
}
$operation = new COperation();
$operation->sejour_id = $this->_id;
$operation->date = CMbDT::date($date);
$operation->loadMatchingObject();
return $this->_ref_curr_operation = $operation;
}