RecipientBuilder
in package
Class RecipientBuilder
Table of Contents
Constants
- PHASE_ADDITION_FIRST = 'addl-first'
- Generate action_log's for new, first-time alerts to additional contacts.
- PHASE_ADDITION_REPEAT = 'addl-repeat'
- Generate action_log's for repeated, follow-up alerts to additional contacts.
- PHASE_RELATION_FIRST = 'rel-first'
- Generate action_log's for new, first-time alerts to related contacts.
- PHASE_RELATION_REPEAT = 'rel-repeat'
- Generate action_log's for repeated, follow-up alerts to related contacts.
Properties
Methods
- __construct() : mixed
- build() : mixed
- Fill the civicrm_action_log with any new/missing TODOs.
- buildAddlFirstPass() : mixed
- Generate action_log's for new, first-time alerts to additional contacts.
- buildAddlRepeatPass() : mixed
- Generate action_log's for repeated, follow-up alerts to additional contacts.
- buildRelFirstPass() : mixed
- Generate action_log's for new, first-time alerts to related contacts, and contacts who are again eligible to receive the alert e.g. membership renewal reminders.
- buildRelRepeatPass() : mixed
- Generate action_log's for repeated, follow-up alerts to related contacts.
- getMappingTable() : string
- isSmartGroup() : bool
- joinReminder() : CRM_Utils_SQL_Select
- Add a JOIN clause like "INNER JOIN civicrm_action_log reminder ON...".
- parseRepetitionInterval() : int|string
- Parse repetition interval.
- prepareAddlFilter() : CRM_Utils_SQL_Select|null
- prepareContactFilter() : CRM_Utils_SQL_Select
- Prepare filter options for limiting by contact ID or group ID.
- prepareLanguageFilter() : string
- Prepare language filter.
- prepareQuery() : CRM_Utils_SQL_Select
- prepareRepetitionEndFilter() : CRM_Utils_SQL_Select
- prepareStartDateClauses() : array<string|int, mixed>
- resetOnTriggerDateChange() : bool
- Should we use the reference date when checking to see if we already sent reminders.
- selectActionLogFields() : CRM_Utils_SQL_Select
- Generate a query fragment like for populating action logs, e.g.
- selectIntoActionLog() : CRM_Utils_SQL_Select
- Generate a query fragment like for populating action logs, e.g.
Constants
PHASE_ADDITION_FIRST
Generate action_log's for new, first-time alerts to additional contacts.
public
mixed
PHASE_ADDITION_FIRST
= 'addl-first'
Tags
PHASE_ADDITION_REPEAT
Generate action_log's for repeated, follow-up alerts to additional contacts.
public
mixed
PHASE_ADDITION_REPEAT
= 'addl-repeat'
Tags
PHASE_RELATION_FIRST
Generate action_log's for new, first-time alerts to related contacts.
public
mixed
PHASE_RELATION_FIRST
= 'rel-first'
Tags
PHASE_RELATION_REPEAT
Generate action_log's for repeated, follow-up alerts to related contacts.
public
mixed
PHASE_RELATION_REPEAT
= 'rel-repeat'
Tags
Properties
$actionSchedule
private
CRM_Core_DAO_ActionSchedule
$actionSchedule
$mapping
private
MappingInterface
$mapping
$now
private
mixed
$now
Methods
__construct()
public
__construct(mixed $now, CRM_Core_DAO_ActionSchedule $actionSchedule, MappingInterface $mapping) : mixed
Parameters
- $now : mixed
- $actionSchedule : CRM_Core_DAO_ActionSchedule
- $mapping : MappingInterface
build()
Fill the civicrm_action_log with any new/missing TODOs.
public
build() : mixed
Tags
buildAddlFirstPass()
Generate action_log's for new, first-time alerts to additional contacts.
protected
buildAddlFirstPass() : mixed
Tags
buildAddlRepeatPass()
Generate action_log's for repeated, follow-up alerts to additional contacts.
protected
buildAddlRepeatPass() : mixed
Tags
buildRelFirstPass()
Generate action_log's for new, first-time alerts to related contacts, and contacts who are again eligible to receive the alert e.g. membership renewal reminders.
protected
buildRelFirstPass() : mixed
Tags
buildRelRepeatPass()
Generate action_log's for repeated, follow-up alerts to related contacts.
protected
buildRelRepeatPass() : mixed
Tags
getMappingTable()
protected
getMappingTable() : string
Return values
stringisSmartGroup()
protected
isSmartGroup(int $groupId) : bool
Parameters
- $groupId : int
Return values
booljoinReminder()
Add a JOIN clause like "INNER JOIN civicrm_action_log reminder ON...".
protected
joinReminder(string $joinType, string $for, CRM_Utils_SQL_Select $query) : CRM_Utils_SQL_Select
Parameters
- $joinType : string
-
Join type (eg INNER JOIN, LEFT JOIN).
- $for : string
-
Ex: 'rel', 'addl'.
- $query : CRM_Utils_SQL_Select
Tags
Return values
CRM_Utils_SQL_SelectparseRepetitionInterval()
Parse repetition interval.
protected
parseRepetitionInterval() : int|string
Return values
int|stringprepareAddlFilter()
protected
prepareAddlFilter(string $contactIdField) : CRM_Utils_SQL_Select|null
Parameters
- $contactIdField : string
Return values
CRM_Utils_SQL_Select|nullprepareContactFilter()
Prepare filter options for limiting by contact ID or group ID.
protected
prepareContactFilter(string $contactIdField) : CRM_Utils_SQL_Select
Parameters
- $contactIdField : string
Return values
CRM_Utils_SQL_SelectprepareLanguageFilter()
Prepare language filter.
protected
prepareLanguageFilter(string $contactTableAlias) : string
Parameters
- $contactTableAlias : string
Return values
stringprepareQuery()
protected
prepareQuery(string $phase) : CRM_Utils_SQL_Select
Parameters
- $phase : string
Tags
Return values
CRM_Utils_SQL_SelectprepareRepetitionEndFilter()
protected
prepareRepetitionEndFilter(string $dateField) : CRM_Utils_SQL_Select
Parameters
- $dateField : string
Return values
CRM_Utils_SQL_SelectprepareStartDateClauses()
protected
prepareStartDateClauses() : array<string|int, mixed>
Return values
array<string|int, mixed>resetOnTriggerDateChange()
Should we use the reference date when checking to see if we already sent reminders.
protected
resetOnTriggerDateChange() : bool
Return values
boolselectActionLogFields()
Generate a query fragment like for populating action logs, e.g.
protected
selectActionLogFields(string $phase, CRM_Utils_SQL_Select $query) : CRM_Utils_SQL_Select
"SELECT contact_id, entity_id, entity_table, action schedule_id"
Parameters
- $phase : string
- $query : CRM_Utils_SQL_Select
Tags
Return values
CRM_Utils_SQL_SelectselectIntoActionLog()
Generate a query fragment like for populating action logs, e.g.
protected
selectIntoActionLog(string $phase, CRM_Utils_SQL_Select $query) : CRM_Utils_SQL_Select
"INSERT INTO civicrm_action_log (...) SELECT (...)"
Parameters
- $phase : string
- $query : CRM_Utils_SQL_Select