);
list($this->_values['custom_pre_id'],
$this->_values['custom_post_id']
- ) = CRM_Core_BAO_UFJoin::getUFGroupIds($ufJoinParams);
+ ) = CRM_Core_BAO_UFJoin::getUFGroupIds($ufJoinParams);
// set profiles for additional participants
if ($this->_values['event']['is_multiple_registrations']) {
list($this->_values['additional_custom_pre_id'],
$this->_values['additional_custom_post_id'], $preActive, $postActive
- ) = CRM_Core_BAO_UFJoin::getUFGroupIds($ufJoinParams);
+ ) = CRM_Core_BAO_UFJoin::getUFGroupIds($ufJoinParams);
// CRM-4377: we need to maintain backward compatibility, hence if there is profile for main contact
// set same profile for additional contacts.
// Handle PCP
$pcpId = CRM_Utils_Request::retrieve('pcpId', 'Positive', $this);
if ($pcpId) {
- $pcp = CRM_PCP_BAO_PCP::handlePcp($pcpId, 'event', $this->_values['event']);
- $this->_pcpId = $pcp['pcpId'];
+ $pcp = CRM_PCP_BAO_PCP::handlePcp($pcpId, 'event', $this->_values['event']);
+ $this->_pcpId = $pcp['pcpId'];
$this->_values['event']['intro_text'] = CRM_Utils_Array::value('intro_text', $pcp['pcpInfo']);
}
$this->set('name', $name);
$vars = array(
- 'amount', 'currencyID', 'credit_card_type',
- 'trxn_id', 'amount_level', 'receive_date',
+ 'amount',
+ 'currencyID',
+ 'credit_card_type',
+ 'trxn_id',
+ 'amount_level',
+ 'receive_date',
);
foreach ($vars as $v) {
*/
public function buildCustom($id, $name, $viewOnly = FALSE) {
if ($id) {
- $button = substr($this->controller->getButtonName(), -4);
- $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
- $session = CRM_Core_Session::singleton();
+ $button = substr($this->controller->getButtonName(), -4);
+ $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
+ $session = CRM_Core_Session::singleton();
$contactID = $session->get('userID');
// we don't allow conflicting fields to be
$field['is_required'] = FALSE;
}
// CRM-11316 Is ReCAPTCHA enabled for this profile AND is this an anonymous visitor
- elseif ($field['add_captcha'] && !$contactID) {
+ elseif ($field['add_captcha'] && !$contactID) {
// only add captcha for first page
$addCaptcha = TRUE;
}
}
if (property_exists($form, '_context') && ($form->_context == 'standalone'
- || $form->_context == 'participant')) {
+ || $form->_context == 'participant')
+ ) {
$discountedEvent = CRM_Core_BAO_Discount::getOptionGroup($eventID, 'civicrm_event');
if (is_array($discountedEvent)) {
foreach ($discountedEvent as $key => $priceSetId) {
$this->_params['contactID'] = $contactID;
if (array_key_exists('email-5', $this->_params)) {
- $mail = 'email-5';
+ $mail = 'email-5';
}
else {
foreach ($this->_params as $name => $dontCare) {
// 3. waiting list participant.
// 4. require approval participant.
if (!empty($this->_params['is_pay_later']) ||
- $this->_allowWaitlist || $this->_requireApproval || empty($this->_values['event']['is_monetary'])) {
+ $this->_allowWaitlist || $this->_requireApproval || empty($this->_values['event']['is_monetary'])
+ ) {
$mail = 'email-Primary';
}
/**
* Process the participant
*
- * @param array $params
+ * @param CRM_Core_Form $form
* @param int $contactID
- *
- * @return void
+ * @return \CRM_Event_BAO_Participant
*/
public static function addParticipant(&$form, $contactID) {
if (empty($form->_params)) {
}
$participantFields = CRM_Event_DAO_Participant::fields();
- $participantParams = array('id' => CRM_Utils_Array::value('participant_id', $params),
+ $participantParams = array(
+ 'id' => CRM_Utils_Array::value('participant_id', $params),
'contact_id' => $contactID,
'event_id' => $form->_eventId ? $form->_eventId : $params['event_id'],
'status_id' => CRM_Utils_Array::value('participant_status',
return $totalCount;
}
- $priceSetId = $form->get('priceSetId');
- $addParticipantNum = substr($form->_name, 12);
- $priceSetFields = $priceSetDetails = array();
+ $priceSetId = $form->get('priceSetId');
+ $addParticipantNum = substr($form->_name, 12);
+ $priceSetFields = $priceSetDetails = array();
$hasPriceFieldsCount = FALSE;
if ($priceSetId) {
$priceSetDetails = $form->get('priceSet');
* An array of user submitted params.
*
*
- * @return array $formatted, formatted price set params.
+ * @return array
+ * , formatted price set params.
*/
/**
* @param CRM_Core_Form $form
* Form object.
*
*
- * @return array $optionsCount, array of each option w/ count total.
+ * @return array
+ * , array of each option w/ count total.
*/
/**
* @param $form
* @return array
*/
public static function getPriceSetOptionCount(&$form) {
- $params = $form->get('params');
- $priceSet = $form->get('priceSet');
+ $params = $form->get('params');
+ $priceSet = $form->get('priceSet');
$priceSetId = $form->get('priceSetId');
$optionsCount = array();
/**
* Validate price set submitted params for price option limit,
* as well as user should select at least one price field option.
- * @param unknown_type $form
- * @param unknown_type $params
- * @return multitype:|Ambigous <multitype:, string, string>
+ *
+ * @param CRM_Core_Form $form
+ * @param array $params
+ *
+ * @return array
*/
public static function validatePriceSet(&$form, $params) {
$errors = array();
return $errors;
}
- // set the first participant ID if not set, CRM-10032
/**
+ * set the first participant ID if not set, CRM-10032
+ *
* @param int $participantID
*/
public function processFirstParticipant($participantID) {
// also set the allow confirmation stuff
if (array_key_exists(
- $this->_values['participant']['status_id'],
- CRM_Event_PseudoConstant::participantStatus(NULL, "class = 'Pending'")
- )) {
+ $this->_values['participant']['status_id'],
+ CRM_Event_PseudoConstant::participantStatus(NULL, "class = 'Pending'")
+ )) {
$this->_allowConfirmation = TRUE;
$this->set('allowConfirmation', TRUE);
}
$now = date('YmdHis');
$startDate = CRM_Utils_Date::processDate(CRM_Utils_Array::value('registration_start_date',
- $this->_values['event']
- ));
+ $this->_values['event']
+ ));
if (
$startDate &&
}
$endDate = CRM_Utils_Date::processDate(CRM_Utils_Array::value('registration_end_date',
- $this->_values['event']
- ));
+ $this->_values['event']
+ ));
$eventEndDate = CRM_Utils_Date::processDate(CRM_Utils_Array::value('event_end_date', $this->_values['event']));
if (
$endDate &&