*/
/**
- *
- *
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form components for processing Event
- *
+ * This class generates form components for processing Event.
*/
class CRM_Event_Form_Registration extends CRM_Core_Form {
/**
* Assign the minimal set of variables to the template.
- *
- * @return void
*/
public function assignToTemplate() {
//process only primary participant params
* @param int $id
* @param string $name
* @param bool $viewOnly
- *
- * @return void
*/
public function buildCustom($id, $name, $viewOnly = FALSE) {
if ($id) {
}
/**
+ * Initiate event fee.
+ *
* @param CRM_Core_Form $form
* @param int $eventID
*
* @param int $contactID
* @param null $contribution
* @param null $payment
- *
- * @return void
*/
public function confirmPostProcess($contactID = NULL, $contribution = NULL, $payment = NULL) {
// add/update contact information
*
* @param CRM_Core_Form $form
* @param int $contactID
+ *
* @return \CRM_Event_BAO_Participant
*/
public static function addParticipant(&$form, $contactID) {
return $participant;
}
- /* Calculate the total participant count as per params.
- *
- * @param array $params
- * User params.
- *
- * @return $totalCount total participant count.
- */
/**
+ * Calculate the total participant count as per params.
+ *
* @param CRM_Core_Form $form
* @param array $params
+ * User params.
* @param bool $skipCurrent
*
- * @return int|string
+ * @return int
*/
public static function getParticipantCount(&$form, $params, $skipCurrent = FALSE) {
$totalCount = 0;
return $totalCount;
}
- /* Format user submitted price set params.
+ /**
+ * Format user submitted price set params.
+ *
* Convert price set each param as an array.
*
+ * @param CRM_Core_Form $form
* @param array $params
* An array of user submitted params.
*
- *
* @return array
- * , formatted price set params.
- */
- /**
- * @param CRM_Core_Form $form
- * @param array $params
- *
- * @return mixed
+ * Formatted price set params.
*/
public static function formatPriceSetParams(&$form, $params) {
if (!is_array($params) || empty($params)) {
return $params;
}
- /* Calculate total count for each price set options.
- * those are currently selected by user.
- *
- * @param $form
- * Form object.
+ /**
+ * Calculate total count for each price set options.
*
+ * - currently selected by user.
*
- * @return array
- * , array of each option w/ count total.
- */
- /**
- * @param $form
+ * @param CRM_Core_Form $form
+ * Form object.
*
* @return array
+ * array of each option w/ count total.
*/
public static function getPriceSetOptionCount(&$form) {
$params = $form->get('params');
}
/**
+ * Check if template file exists.
+ *
* @param string $suffix
*
* @return null|string
}
/**
+ * Get template file name.
+ *
* @return null|string
*/
public function getTemplateFileName() {
}
/**
+ * Override extra template name.
+ *
* @return null|string
*/
public function overrideExtraTemplateFileName() {
* Reset values for all options those are full.
*
* @param array $optionFullIds
- * @param $form
+ * @param CRM_Core_Form $form
*/
public static function resetElementValue($optionFullIds = array(), &$form) {
if (!is_array($optionFullIds) ||
}
/**
+ * Reset submitted value.
+ *
* @param string $elementName
* @param array $optionIds
* @param CRM_Core_form $form
}
/**
- * Validate price set submitted params for price option limit,
- * as well as user should select at least one price field option.
+ * Validate price set submitted params for price option limit.
+ *
+ * User should select at least one price field option.
*
* @param CRM_Core_Form $form
* @param array $params
}
/**
- * set the first participant ID if not set, CRM-10032
+ * Set the first participant ID if not set.
+ *
+ * CRM-10032.
*
* @param int $participantID
*/
}
/**
+ * Check if event is valid.
+ *
* @todo - combine this with CRM_Event_BAO_Event::validRegistrationRequest
* (probably extract relevant values here & call that with them & handle bounces & redirects here -as
* those belong in the form layer)