class CRM_Member_ActionMapping extends Mapping

Class CRM_Member_ActionMapping

This defines the scheduled-reminder functionality for CiviMember memberships. It allows one to target reminders based on join date or end date, with additional filtering based on membership-type.

Constants

MEMBERSHIP_TYPE_MAPPING_ID

The value for civicrm_action_schedule.mapping_id which identifies the "Membership Type" mapping.

Note: This value is chosen to match legacy DB IDs.

Properties

protected $id from Mapping
protected string $entity The basic entity to query (table name). from Mapping

Methods

static Mapping
create(array $params)

Create mapping.

from Mapping
__construct(array $params)

Class constructor.

from Mapping
mixed
getId()

No description

from Mapping
string
getEntity()

No description

from Mapping
string
getLabel()

Get a printable label for this mapping type.

from Mapping
string
getValueHeader()

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

from Mapping
string
getStatusHeader()

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

from Mapping
array
getValueLabels()

Get a list of value options.

from Mapping
array
getStatusLabels(string|int $value)

Get a list of status options.

from Mapping
array
getDateFields()

Get a list of available date fields.

from Mapping
array
getRecipientTypes()

Get a list of recipient types.

from Mapping
array
getRecipientListing(string $recipientType)

Get a list of recipients which match the given type.

from Mapping
static 
getValueLabelMap($name)

No description

from Mapping
array
validateSchedule(CRM_Core_DAO_ActionSchedule $schedule)

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

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

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

static 
onRegisterActionMappings( $registrations)

Register CiviMember-related action mappings.

array

Details

in Mapping at line 85
static Mapping create(array $params)

Create mapping.

Parameters

array $params

Return Value

Mapping

in Mapping at line 94
__construct(array $params)

Class constructor.

Parameters

array $params

in Mapping at line 167
mixed getId()

Return Value

mixed

in Mapping at line 174
string getEntity()

Return Value

string

in Mapping at line 183
string getLabel()

Get a printable label for this mapping type.

Return Value

string

in Mapping at line 192
string getValueHeader()

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

Return Value

string

in Mapping at line 201
string getStatusHeader()

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

Return Value

string

in Mapping at line 212
array getValueLabels()

Get a list of value options.

Return Value

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

in Mapping at line 226
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').

in Mapping at line 244
array getDateFields()

Get a list of available date fields.

Return Value

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

in Mapping at line 265
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').

in Mapping at line 282
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

in Mapping at line 286
static protected getValueLabelMap($name)

Parameters

$name

in Mapping at line 328
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 79
CRM_Utils_SQL_Select createQuery(CRM_Core_DAO_ActionSchedule $schedule, string $phase, array $defaultParams)

Generate a query to locate recipients 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

See also

RecipientBuilder

at line 52
static onRegisterActionMappings( $registrations)

Register CiviMember-related action mappings.

Parameters

$registrations

at line 123
protected array prepareMembershipPermissionsFilter()

Return Value

array