本文整理汇总了PHP中CRM_Event_BAO_Event::updateParticipantCampaignID方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Event_BAO_Event::updateParticipantCampaignID方法的具体用法?PHP CRM_Event_BAO_Event::updateParticipantCampaignID怎么用?PHP CRM_Event_BAO_Event::updateParticipantCampaignID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Event_BAO_Event
的用法示例。
在下文中一共展示了CRM_Event_BAO_Event::updateParticipantCampaignID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: endPostProcess
public function endPostProcess()
{
// make submit buttons keep the current working tab opened.
if ($this->_action & CRM_Core_Action::UPDATE) {
$className = CRM_Utils_String::getClassName($this->_name);
// hack for special cases.
switch ($className) {
case 'Event':
$attributes = $this->getVar('_attributes');
$subPage = strtolower(basename(CRM_Utils_Array::value('action', $attributes)));
break;
case 'EventInfo':
$subPage = 'settings';
break;
case 'ScheduleReminders':
$subPage = 'reminder';
break;
default:
$subPage = strtolower($className);
break;
}
CRM_Core_Session::setStatus(ts("'%1' information has been saved.", array(1 => CRM_Utils_Array::value('title', CRM_Utils_Array::value($subPage, $this->get('tabHeader')), $className))), ts('Saved'), 'success');
$config = CRM_Core_Config::singleton();
if (in_array('CiviCampaign', $config->enableComponents)) {
$values = $this->controller->exportValues($this->_name);
$newCampaignID = CRM_Utils_Array::value('campaign_id', $values);
$eventID = CRM_Utils_Array::value('id', $values);
if ($eventID && $this->_campaignID != $newCampaignID) {
CRM_Event_BAO_Event::updateParticipantCampaignID($eventID, $newCampaignID);
}
}
$this->postProcessHook();
if ($this->controller->getButtonName('submit') == "_qf_{$className}_upload_done") {
if ($this->_isTemplate) {
CRM_Core_Session::singleton()->pushUserContext(CRM_Utils_System::url('civicrm/admin/eventTemplate', 'reset=1'));
} else {
CRM_Core_Session::singleton()->pushUserContext(CRM_Utils_System::url('civicrm/event/manage', 'reset=1'));
}
} else {
CRM_Core_Session::singleton()->pushUserContext(CRM_Utils_System::url("civicrm/event/manage/{$subPage}", "action=update&reset=1&id={$this->_id}"));
}
}
}