本文整理汇总了PHP中COperation::fieldModified方法的典型用法代码示例。如果您正苦于以下问题:PHP COperation::fieldModified方法的具体用法?PHP COperation::fieldModified怎么用?PHP COperation::fieldModified使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COperation
的用法示例。
在下文中一共展示了COperation::fieldModified方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateFromOperation
/**
* Generate content
*
* @param COperation $operation Operation
*
* @return void
*/
function generateFromOperation(COperation $operation)
{
$evenementsServeurActes = $this->documentElement;
$evenementServeurIntervention = $this->addElement($evenementsServeurActes, "evenementServeurIntervention");
$actionConversion = array("create" => "création", "store" => "modification", "delete" => "suppression");
$action = !$operation->loadLastLog() ? "modification" : $actionConversion[$operation->_ref_last_log->type];
if ($operation->fieldModified("annulee", 1) || $operation->annulee) {
$action = "suppression";
}
$this->addAttribute($evenementServeurIntervention, "action", $action);
// Date de l'action
$this->addDateTimeElement($evenementServeurIntervention, "dateAction");
// Ajout du patient
$patient = $this->addElement($evenementServeurIntervention, "patient");
$mbPatient = $operation->_ref_sejour->_ref_patient;
$this->addPatient($patient, $mbPatient, false, true);
// Ajout de la venue
$venue = $this->addElement($evenementServeurIntervention, "venue");
$mbSejour = $operation->_ref_sejour;
$this->addVenue($venue, $mbSejour, null, true);
// Ajout de l'intervention
$operation->loadLastId400($this->_ref_receiver->_tag_hprimxml);
$intervention = $this->addElement($evenementServeurIntervention, "intervention");
$this->addIntervention($intervention, $operation);
// Traitement final
$this->purgeEmptyElements();
}