class CRM_Contribute_ActionMapping_ByPage implements MappingInterface

Class CRM_Contribute_ActionMapping_ByPage

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 page on which the contribution was made.

Constants

MAPPING_ID

The value for civicrm_action_schedule.mapping_id which identifies the "Contribution Page" mapping.

Methods

static 
onRegisterActionMappings( $registrations)

Register Activity-related action mappings.

mixed
getId()

No description

string
getEntity()

No description

string
getLabel()

Get a printable label for this mapping type.

string
getValueHeader()

Get a printable label to use as the header on the 'value' filter.

string
getStatusHeader()

Get a printable label to use as the header on the 'status' filter.

array
getValueLabels()

Get a list of value options.

array
getStatusLabels(string|int $value)

Get a list of status options.

array
getDateFields()

Get a list of available date fields.

array
getRecipientTypes()

Get a list of recipient types.

array
getRecipientListing(string $recipientType)

Get a list of recipients which match the given type.

array
validateSchedule(CRM_Core_DAO_ActionSchedule $schedule)

Determine whether a schedule based on this mapping is sufficiently complete.

createQuery(CRM_Core_DAO_ActionSchedule $schedule, string $phase, array $defaultParams)

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

Details

at line 51
static onRegisterActionMappings( $registrations)

Register Activity-related action mappings.

Parameters

$registrations

at line 58
mixed getId()

Return Value

mixed

at line 65
string getEntity()

Return Value

string

at line 74
string getLabel()

Get a printable label for this mapping type.

Return Value

string

at line 83
string getValueHeader()

Get a printable label to use as the header on the 'value' filter.

Return Value

string

at line 92
string getStatusHeader()

Get a printable label to use as the header on the 'status' filter.

Return Value

string

at line 104
array getValueLabels()

Get a list of value options.

Return Value

array Array(string $value => string $label). Ex: array(123 => 'Phone Call', 456 => 'Meeting').

Exceptions

CRM_Core_Exception

at line 119
array getStatusLabels(string|int $value)

Get a list of status options.

Parameters

string|int $value The list of status options may be contingent upon the selected filter value. This is the selected filter value.

Return Value

array Array(string $value => string $label). Ex: Array(123 => 'Completed', 456 => 'Scheduled').

Exceptions

CRM_Core_Exception

at line 129
array getDateFields()

Get a list of available date fields.

Return Value

array Array(string $fieldName => string $fieldLabel).

at line 148
array getRecipientTypes()

Get a list of recipient types.

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 Value

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

at line 165
array getRecipientListing(string $recipientType)

Get a list of recipients which match the given type.

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

Parameters

string $recipientType Ex: 'participant_role'.

Return Value

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

See also

getRecipientTypes

at line 178
array validateSchedule(CRM_Core_DAO_ActionSchedule $schedule)

Determine whether a schedule based on this mapping is sufficiently complete.

Parameters

CRM_Core_DAO_ActionSchedule $schedule

Return Value

array Array (string $code => string $message). List of error messages.

at line 195
CRM_Utils_SQL_Select createQuery(CRM_Core_DAO_ActionSchedule $schedule, string $phase, array $defaultParams)

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

Parameters

CRM_Core_DAO_ActionSchedule $schedule
string $phase See, e.g., RecipientBuilder::PHASE_RELATION_FIRST.
array $defaultParams Default parameters that should be included with query.

Return Value

CRM_Utils_SQL_Select

Exceptions

CRM_Core_Exception

See also

RecipientBuilder