本文整理汇总了PHP中CRM_Event_BAO_Participant::changeFeeSelections方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Event_BAO_Participant::changeFeeSelections方法的具体用法?PHP CRM_Event_BAO_Participant::changeFeeSelections怎么用?PHP CRM_Event_BAO_Participant::changeFeeSelections使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Event_BAO_Participant
的用法示例。
在下文中一共展示了CRM_Event_BAO_Participant::changeFeeSelections方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postProcess
public function postProcess()
{
$params = $this->controller->exportValues($this->_name);
$feeBlock = $this->_values['fee'];
$lineItems = $this->_values['line_items'];
CRM_Event_BAO_Participant::changeFeeSelections($params, $this->_participantId, $this->_contributionId, $feeBlock, $lineItems, $this->_paidAmount, $params['priceSetId']);
$this->contributionAmt = CRM_Core_DAO::getFieldValue('CRM_Contribute_BAO_Contribution', $this->_contributionId, 'total_amount');
// email sending
if (CRM_Utils_Array::value('send_receipt', $params)) {
$fetchParticipantVals = array('id' => $this->_participantId);
CRM_Event_BAO_Participant::getValues($fetchParticipantVals, $participantDetails, CRM_Core_DAO::$_nullArray);
$participantParams = array_merge($params, $participantDetails[$this->_participantId]);
$mailSent = $this->emailReceipt($participantParams);
}
// update participant
CRM_Core_DAO::setFieldValue('CRM_Event_DAO_Participant', $this->_participantId, 'status_id', $params['status_id']);
if (!empty($params['note'])) {
$noteParams = array('entity_table' => 'civicrm_participant', 'note' => $params['note'], 'entity_id' => $this->_participantId, 'contact_id' => $this->_contactId, 'modified_date' => date('Ymd'));
CRM_Core_BAO_Note::add($noteParams);
}
CRM_Core_Session::setStatus(ts("The fee selection has been changed for this participant"), ts('Saved'), 'success');
$buttonName = $this->controller->getButtonName();
if ($buttonName == $this->getButtonName('upload', 'new')) {
$session = CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url('civicrm/payment/add', "reset=1&action=add&component=event&id={$this->_participantId}&cid={$this->_contactId}"));
}
}