);
/**
- *
*/
public function __construct() {
parent::__construct();
$hasNoteField = FALSE;
foreach (array(
'note',
- 'participant_note'
+ 'participant_note',
) as $noteFld) {
if (array_key_exists($noteFld, $params)) {
$noteValue = $params[$noteFld];
* @param bool $returnWaitingCount
* @param bool $considerTestParticipant
*
- * @return bool|int|null|string 1. false => If event having some empty spaces.@static
+ * @return bool|int|null|string
+ * 1. false => If event having some empty spaces.
+ * @static
*/
static function eventFull(
$eventId,
* @param bool $considerWaiting
* @param bool $considerTestParticipants
*
- * @return array $optionsCount an array of each option id and total count
+ * @return array
+ * an array of each option id and total count
* @static
*/
static function priceSetOptionsCount(
* @param int $eventId
* Event id.
*
- * @return int $spaces Number of Empty Seats/null.
+ * @return int
+ * $spaces Number of Empty Seats/null.
* @static
*/
public static function pendingToConfirmSpaces($eventId) {
* @param bool $status
* @param bool $onlyParticipant
*
- * @return array array of importable Fields
+ * @return array
+ * array of importable Fields
* @static
*/
public static function &importableFields($contactType = 'Individual', $status = TRUE, $onlyParticipant = FALSE) {
'title' => ts('Participant Note'),
'name' => 'participant_note',
'headerPattern' => '/(participant.)?note$/i',
- )
+ ),
);
// Split status and status id into 2 fields
'title' => ts('Participant Status'),
'name' => 'participant_status',
'data_type' => CRM_Utils_Type::T_STRING,
- )
+ ),
);
$tmpFields['participant_status_id']['title'] = ts('Participant Status Id');
'title' => ts('Participant Role'),
'name' => 'participant_role',
'data_type' => CRM_Utils_Type::T_STRING,
- )
+ ),
);
$tmpFields['participant_role_id']['title'] = ts('Participant Role Id');
'title' => ts('Event Type'),
'name' => 'event_type',
'data_type' => CRM_Utils_Type::T_STRING,
- )
+ ),
);
$tmpContactField = $contactFields = array();
/**
* Combine all the exportable fields from the lower levels object
*
- * @return array array of exportable Fields
+ * @return array
+ * array of exportable Fields
* @static
*/
public static function &exportableFields() {
'participant_note' => array(
'title' => 'Participant Note',
'name' => 'participant_note',
- )
+ ),
);
$participantStatus = array(
'participant_status' => array(
'title' => 'Participant Status',
'name' => 'participant_status',
- )
+ ),
);
$participantRole = array(
'participant_role' => array(
'title' => 'Participant Role',
'name' => 'participant_role',
- )
+ ),
);
//CRM-13595 add event id to participant export
'event_id' => array(
'title' => 'Event ID',
'name' => 'event_id',
- )
+ ),
);
$eventtitle = array(
'event_title' => array(
'title' => 'Event Title',
'name' => 'event_title',
- )
+ ),
);
$discountFields = CRM_Core_DAO_Discount::export();
* @param int $participantId
* Id of the participant.
*
- * @return array $name associated array with sort_name and event title
+ * @return array
+ * associated array with sort_name and event title
* @static
*/
public static function participantDetails($participantId) {
}
/**
- * This function is used to convert associative array names to values
+ * convert associative array names to values
* and vice-versa.
*
* This function is used by both the web form layer and the api. Note that
*
* @param int $oldStatusId
*
- * @return array $additionalParticipantIds
+ * @return array
* @static
*/
public static function getAdditionalParticipantIds($primaryParticipantId, $excludeCancel = TRUE, $oldStatusId = NULL) {
* @param bool $hasLineItems
* Do fetch from line items.
*
- * @return array $feeDetails
+ * @return array
* @static
*/
public function getFeeDetails($participantIds, $hasLineItems = FALSE) {
* @param int $primaryParticipantID
* Id of primary participant record.
*
- * @return array $additionalParticipants $displayName => $viewUrl
+ * @return array
+ * $displayName => $viewUrl
* @static
*/
public static function getAdditionalParticipants($primaryParticipantID) {
if (is_string($emptySeats) && $emptySeats !== NULL) {
$maxParticipants = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $eventId, 'max_participants');
$eventfullMsg = ts("This event currently has the maximum number of participants registered (%1). However, you can still override this limit and register additional participants using this form.", array(
- 1 => $maxParticipants
+ 1 => $maxParticipants,
)) . '<br />';
}
*
* @param int $participantId
*
- * @return true if participant is primary
+ * @return bool
+ * true if participant is primary
*/
public static function isPrimaryParticipant($participantId) {
* @param int $newStatusId
* New status.
*
- * @return true if allowed
+ * @return bool
+ * true if allowed
*/
public static function getValidAdditionalIds($participantId, $oldStatusId, $newStatusId) {
*
* @param int $contactID
*
- * @return int count of participant records
+ * @return int
+ * count of participant records
* @static
*/
public static function getContactParticipantCount($contactID) {
* @param bool $excludeCancelled
* Exclude cancelled additional participant.
*
- * @return array $participantsId
+ * @return array
* @static
*/
public static function getParticipantIds($contributionId, $excludeCancelled = FALSE) {
// get additional participant ids (including cancelled)
if ($participantId) {
$ids = array_merge(array(
- $participantId
+ $participantId,
), self::getAdditionalParticipantIds($participantId,
$excludeCancelled
));
* @param array $participantIds
* An array of additional participant ids.
*
- * @return array of Urls.
+ * @return array
+ * of Urls.
* @static
*/
public static function getAdditionalParticipantUrl($participantIds) {
}
/**
- * To create trxn entry if an event has discount.
+ * create trxn entry if an event has discount.
*
* @param int $eventID
* Event id.
WHERE cpf.price_set_id = %1 AND cpfv.label LIKE %2";
$params = array(
1 => array($priceSetId, 'Integer'),
- 2 => array($feeLevel, 'String')
+ 2 => array($feeLevel, 'String'),
);
$mainAmount = CRM_Core_DAO::singleValueQuery($query, $params);
$relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Discounts Account is' "));
'payment_instrument_id' => $updatedContribution->payment_instrument_id,
'contribution_id' => $updatedContribution->id,
'trxn_date' => date('YmdHis'),
- 'currency' => $updatedContribution->currency
+ 'currency' => $updatedContribution->currency,
);
$adjustedTrxn = CRM_Core_BAO_FinancialTrxn::create($adjustedTrxnValues);
}