class RecipientBuilder

Class RecipientBuilder

Constants

PHASE_RELATION_FIRST

Generate action_log's for new, first-time alerts to related contacts.

PHASE_ADDITION_FIRST

Generate action_log's for new, first-time alerts to additional contacts.

PHASE_RELATION_REPEAT

Generate action_log's for repeated, follow-up alerts to related contacts.

PHASE_ADDITION_REPEAT

Generate action_log's for repeated, follow-up alerts to additional contacts.

Methods

__construct($now, CRM_Core_DAO_ActionSchedule $actionSchedule, MappingInterface $mapping)

No description

build()

Fill the civicrm_action_log with any new/missing TODOs.

buildRelFirstPass()

Generate action_log's for new, first-time alerts to related contacts.

buildAddlFirstPass()

Generate action_log's for new, first-time alerts to additional contacts.

buildRelRepeatPass()

Generate action_log's for repeated, follow-up alerts to related contacts.

buildAddlRepeatPass()

Generate action_log's for repeated, follow-up alerts to additional contacts.

prepareQuery(string $phase)

No description

int|string
parseRepetitionInterval()

Parse repetition interval.

prepareContactFilter(string $contactIdField)

Prepare filter options for limiting by contact ID or group ID.

string
prepareLanguageFilter(string $contactTableAlias)

Prepare language filter.

array
prepareStartDateClauses()

No description

bool
isSmartGroup(int $groupId)

No description

prepareRepetitionEndFilter(string $dateField)

No description

prepareAddlFilter(string $contactIdField)

No description

selectActionLogFields(string $phase, CRM_Utils_SQL_Select $query)

Generate a query fragment like for populating action logs, e.g.

selectIntoActionLog(string $phase, CRM_Utils_SQL_Select $query)

Generate a query fragment like for populating action logs, e.g.

joinReminder(string $joinType, string $for, CRM_Utils_SQL_Select $query)

Add a JOIN clause like "INNER JOIN civicrm_action_log reminder ON.

Details

at line 144
__construct($now, CRM_Core_DAO_ActionSchedule $actionSchedule, MappingInterface $mapping)

Parameters

$now
CRM_Core_DAO_ActionSchedule $actionSchedule
MappingInterface $mapping

at line 155
build()

Fill the civicrm_action_log with any new/missing TODOs.

Exceptions

CRM_Core_Exception

at line 176
protected buildRelFirstPass()

Generate action_log's for new, first-time alerts to related contacts.

Exceptions

Exception

at line 240
protected buildAddlFirstPass()

Generate action_log's for new, first-time alerts to additional contacts.

Exceptions

Exception

at line 269
protected buildRelRepeatPass()

Generate action_log's for repeated, follow-up alerts to related contacts.

at line 312
protected buildAddlRepeatPass()

Generate action_log's for repeated, follow-up alerts to additional contacts.

at line 360
protected CRM_Utils_SQL_Select prepareQuery(string $phase)

Parameters

string $phase

Return Value

CRM_Utils_SQL_Select

Exceptions

CRM_Core_Exception

at line 392
protected int|string parseRepetitionInterval()

Parse repetition interval.

Return Value

int|string

at line 418
protected CRM_Utils_SQL_Select prepareContactFilter(string $contactIdField)

Prepare filter options for limiting by contact ID or group ID.

Parameters

string $contactIdField

Return Value

CRM_Utils_SQL_Select

at line 449
protected string prepareLanguageFilter(string $contactTableAlias)

Prepare language filter.

Parameters

string $contactTableAlias

Return Value

string

at line 469
protected array prepareStartDateClauses()

Return Value

array

at line 495
protected bool isSmartGroup(int $groupId)

Parameters

int $groupId

Return Value

bool

at line 520
protected CRM_Utils_SQL_Select prepareRepetitionEndFilter(string $dateField)

Parameters

string $dateField

Return Value

CRM_Utils_SQL_Select

at line 535
protected CRM_Utils_SQL_Select|null prepareAddlFilter(string $contactIdField)

Parameters

string $contactIdField

Return Value

CRM_Utils_SQL_Select|null

at line 554
protected CRM_Utils_SQL_Select selectActionLogFields(string $phase, CRM_Utils_SQL_Select $query)

Generate a query fragment like for populating action logs, e.g.

"SELECT contact_id, entity_id, entity_table, action schedule_id"

Parameters

string $phase
CRM_Utils_SQL_Select $query

Return Value

CRM_Utils_SQL_Select

Exceptions

CRM_Core_Exception

at line 603
protected CRM_Utils_SQL_Select selectIntoActionLog(string $phase, CRM_Utils_SQL_Select $query)

Generate a query fragment like for populating action logs, e.g.

"INSERT INTO civicrm_action_log (...) SELECT (...)"

Parameters

string $phase
CRM_Utils_SQL_Select $query

Return Value

CRM_Utils_SQL_Select

Exceptions

CRM_Core_Exception

at line 631
protected CRM_Utils_SQL_Select joinReminder(string $joinType, string $for, CRM_Utils_SQL_Select $query)

Add a JOIN clause like "INNER JOIN civicrm_action_log reminder ON.

..".

Parameters

string $joinType Join type (eg INNER JOIN, LEFT JOIN).
string $for Ex: 'rel', 'addl'.
CRM_Utils_SQL_Select $query

Return Value

CRM_Utils_SQL_Select

Exceptions

CRM_Core_Exception