Documentation

CRM_Event_ActionMapping_ByEvent extends CRM_Event_ActionMapping
in package

This defines the scheduled-reminder functionality for CiviEvent participants with filtering by event-type.

Table of Contents

Constants

EVENT_NAME_MAPPING_ID  = 3
EVENT_TPL_MAPPING_ID  = 5
EVENT_TYPE_MAPPING_ID  = 2
Note: These values are integers for legacy reasons; but going forward any new action mapping classes should return a string from `getId` instead of using a constant.

Methods

applies()  : bool
checkAccess()  : bool
Check access to event when the ScheduledReminder form is embedded on an event page
createQuery()  : CRM_Utils_SQL_Select
Generate a query to locate recipients who match the given schedule.
getAlternateRecipients()  : array<string|int, mixed>|null
getBccRecipients()  : array<string|int, mixed>|null
getDateFields()  : array<string|int, mixed>
Get option list for `start_action_date` & `end_date` fields.
getEntity()  : string
Deprecated ambiguously-named function.
getEntityName()  : string
Main entity name e.g. `Activity`
getEntityTable()  : string
Name of the table belonging to the main entity e.g. `civicrm_activity`
getId()  : string|int
Unique identifier of this mapping type.
getLabel()  : string
Label of this mapping type as shown in the "Entity" dropdown-select on the form.
getLimitToOptions()  : array<string|int, mixed>
Get the option list for `limit_to` (non-associative format)
getName()  : string
Unique name of this mapping type.
getRecipientListing()  : array<string|int, mixed>
Get a list of recipients which match the given type.
getRecipientTypes()  : array<string|int, mixed>
Get a list of recipient types.
getStatusLabels()  : array<string|int, mixed>
Get option list for the `entity_status` field.
getSubscribedEvents()  : array<string|int, mixed>
getValueLabels()  : array<string|int, mixed>
Get option list for the `entity_value` field.
modifyApiSpec()  : mixed
modifySpec()  : void
onRegisterActionMappings()  : void
Register this action mapping type with CRM_Core_BAO_ActionSchedule.
resetOnTriggerDateChange()  : bool
Determine whether a schedule based on this mapping should reset the reminder state if the trigger date changes.
sendToAdditional()  : bool
Determine whether a schedule based on this mapping should send to additional contacts.
getFixedRecipients()  : array<string|int, mixed>|null

Constants

EVENT_NAME_MAPPING_ID

public mixed EVENT_NAME_MAPPING_ID = 3

EVENT_TYPE_MAPPING_ID

Note: These values are integers for legacy reasons; but going forward any new action mapping classes should return a string from `getId` instead of using a constant.

public mixed EVENT_TYPE_MAPPING_ID = 2

Methods

applies()

public final applies(string $entity, string $action) : bool
Parameters
$entity : string
$action : string
Return values
bool

checkAccess()

Check access to event when the ScheduledReminder form is embedded on an event page

public checkAccess(array<string|int, mixed> $entityValue) : bool
Parameters
$entityValue : array<string|int, mixed>

An array of event ids

Return values
bool

createQuery()

Generate a query to locate recipients who match the given schedule.

public createQuery(CRM_Core_DAO_ActionSchedule $schedule, string $phase, array<string|int, mixed> $defaultParams) : CRM_Utils_SQL_Select
Parameters
$schedule : CRM_Core_DAO_ActionSchedule

The schedule as configured by the administrator.

$phase : string

See, e.g., RecipientBuilder::PHASE_RELATION_FIRST.

$defaultParams : array<string|int, mixed>
Tags
see
RecipientBuilder
Return values
CRM_Utils_SQL_Select

getDateFields()

Get option list for `start_action_date` & `end_date` fields.

public getDateFields([array<string|int, mixed>|null $entityValue = NULL ]) : array<string|int, mixed>
Parameters
$entityValue : array<string|int, mixed>|null = NULL

Selected value(s) of the entity_value field.

Return values
array<string|int, mixed>

getEntity()

Deprecated ambiguously-named function.

public getEntity() : string
Return values
string

getEntityName()

Main entity name e.g. `Activity`

public getEntityName() : string
Return values
string

getId()

Unique identifier of this mapping type.

public getId() : string|int

Should return a "machine_name" style string (same output as getName()) Note: Some legacy implementations return an int. Don't follow those examples.

Return values
string|int

getLabel()

Label of this mapping type as shown in the "Entity" dropdown-select on the form.

public getLabel() : string
Return values
string

getLimitToOptions()

Get the option list for `limit_to` (non-associative format)

public static getLimitToOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getName()

Unique name of this mapping type.

public getName() : string

Should return a "machine_name" style string (should be the same as getId()).

Return values
string

getRecipientListing()

Get a list of recipients which match the given type.

public getRecipientListing(string $recipientType) : array<string|int, mixed>

Note: A single schedule may filter on multiple recipients. When an admin chooses value(s), it's stored in $schedule->recipient_listing.

Parameters
$recipientType : string

Ex: 'participant_role'.

Tags
see
getRecipientTypes
Return values
array<string|int, mixed>

Array(mixed $name => string $label). Ex: array(1 => 'Attendee', 2 => 'Volunteer').

getRecipientTypes()

Get a list of recipient types.

public static getRecipientTypes() : array<string|int, mixed>

Note: A single schedule may filter on zero or one recipient types. When an admin chooses a value, it's stored in $schedule->recipient.

Return values
array<string|int, mixed>

array(string $value => string $label). Ex: array('assignee' => 'Activity Assignee').

getStatusLabels()

Get option list for the `entity_status` field.

public getStatusLabels(array<string|int, mixed>|null $entityValue) : array<string|int, mixed>
Parameters
$entityValue : array<string|int, mixed>|null

Selected value(s) of the entity_value field.

Return values
array<string|int, mixed>

getSubscribedEvents()

public static getSubscribedEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>

getValueLabels()

Get option list for the `entity_value` field.

public getValueLabels() : array<string|int, mixed>
Return values
array<string|int, mixed>

resetOnTriggerDateChange()

Determine whether a schedule based on this mapping should reset the reminder state if the trigger date changes.

public resetOnTriggerDateChange(mixed $schedule) : bool
Parameters
$schedule : mixed
Return values
bool

sendToAdditional()

Determine whether a schedule based on this mapping should send to additional contacts.

public sendToAdditional(string $entityId) : bool
Parameters
$entityId : string

Either an event ID/event type ID, or a set of event IDs/types separated by the separation character.

Return values
bool

        
On this page

Search results