CRM_Mailing_ActionTokens
class CRM_Mailing_ActionTokens extends AbstractTokenSubscriber
Class CRM_Mailing_ActionTokens
Generate "action.*" tokens for mailings.
To activate these tokens, the TokenProcessor context must specify: "mailingJobId" (int) "mailingActionTarget" (array) with keys: 'id' => int, event queue ID 'hash' => string, event queue hash code 'contact_id' => int, contact_id, 'email' => string, email 'phone' => string, phone
Properties
string | $entity | from AbstractTokenSubscriber | |
array | $tokenNames | from AbstractTokenSubscriber | |
array | $activeTokens | from AbstractTokenSubscriber |
Methods
Class constructor.
Alter the query which prepopulates mailing data for scheduled reminders.
To handle variable tokens, override this function and return the active tokens.
To perform a bulk lookup before rendering tokens, override this function and return the prefetched data.
Details
in AbstractTokenSubscriber at line 58
static
getSubscribedEvents()
at line 48
__construct()
Class constructor.
at line 67
bool
checkActive(TokenProcessor $processor)
in AbstractTokenSubscriber at line 116
registerTokens(TokenRegisterEvent $e)
Register the declared tokens.
in AbstractTokenSubscriber at line 140
alterActionScheduleQuery(MailingQueryEvent $e)
Alter the query which prepopulates mailing data for scheduled reminders.
This is method is not always appropriate, but if you're specifically focused on scheduled reminders, it can be convenient.
in AbstractTokenSubscriber at line 149
evaluateTokens(TokenValueEvent $e)
Populate the token data.
in AbstractTokenSubscriber at line 174
mixed
getActiveTokens(TokenValueEvent $e)
To handle variable tokens, override this function and return the active tokens.
in AbstractTokenSubscriber at line 190
mixed
prefetch(TokenValueEvent $e)
To perform a bulk lookup before rendering tokens, override this function and return the prefetched data.