CRM_Contribute_ActionMapping_ByType
extends CRM_Contribute_ActionMapping
in package
Class CRM_Contribute_ActionMapping_ByType
This defines the scheduled-reminder functionality for contribution entities. It is useful for sending a reminder based on:
- The receipt-date, cancel-date, or thankyou-date.
- The type of contribution.
Table of Contents
Methods
- createQuery() : CRM_Utils_SQL_Select
- Generate a query to locate contacts who match the given schedule.
- getLabel() : string
- Get a printable label for this mapping type.
- getName() : string
- 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.
- getValueLabels() : array<string|int, mixed>
- Get a list of value options.
- modifyApiSpec() : mixed
Methods
createQuery()
Generate a query to locate contacts 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
- $phase : string
-
See, e.g., RecipientBuilder::PHASE_RELATION_FIRST.
- $defaultParams : array<string|int, mixed>
-
Default parameters that should be included with query.
Tags
Return values
CRM_Utils_SQL_SelectgetLabel()
Get a printable label for this mapping type.
public
getLabel() : string
Return values
stringgetName()
public
getName() : string
Return values
stringgetRecipientListing()
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
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').
getValueLabels()
Get a list of value options.
public
getValueLabels() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —Array(string $value => string $label). Ex: array(123 => 'Phone Call', 456 => 'Meeting').
modifyApiSpec()
public
modifyApiSpec(RequestSpec $spec) : mixed
Parameters
- $spec : RequestSpec