class CRM_Contribute_Tokens extends AbstractTokenSubscriber

Class CRM_Contribute_Tokens

Generate "contribution.*" tokens.

At time of writing, we don't have any particularly special tokens -- we just do some basic formatting based on the corresponding DB field.

Properties

string $entity from AbstractTokenSubscriber
array $tokenNames from AbstractTokenSubscriber

Methods

static 
getSubscribedEvents()

No description

__construct()

Class constructor.

bool
checkActive( $processor)

Check if the token processor is active.

registerTokens( $e)

Register the declared tokens.

array
getCustomTokens(string $entity)

Get all custom field tokens of $entity

alterActionScheduleQuery( $e)

Alter action schedule query.

evaluateTokens( $e)

Populate the token data.

mixed
prefetch( $e)

To perform a bulk lookup before rendering tokens, override this function and return the prefetched data.

mixed
evaluateToken( $row, string $entity, string $field, mixed $prefetch = NULL)

No description

array
getPassthruTokens()

Get a list of tokens whose name and title match the DB fields.

array
getAliasTokens()

Get alias tokens.

Details

static getSubscribedEvents()

at line 78
__construct()

Class constructor.

at line 99
bool checkActive( $processor)

Check if the token processor is active.

Parameters

$processor

Return Value

bool

registerTokens( $e)

Register the declared tokens.

Parameters

$e The registration event. Add new tokens using register().

array getCustomTokens(string $entity)

Get all custom field tokens of $entity

Parameters

string $entity

Return Value

array $customTokens return custom field tokens in array('custom_N' => 'label') format

at line 110
alterActionScheduleQuery( $e)

Alter action schedule query.

Parameters

$e The pending query which may be modified. See discussion on MailingQueryEvent::$query.

evaluateTokens( $e)

Populate the token data.

Parameters

$e The event, which includes a list of rows and tokens.

mixed prefetch( $e)

To perform a bulk lookup before rendering tokens, override this function and return the prefetched data.

Parameters

$e

Return Value

mixed

at line 127
mixed evaluateToken( $row, string $entity, string $field, mixed $prefetch = NULL)

Parameters

$row The record for which we want token values.
string $entity The name of the token entity.
string $field The name of the token field.
mixed $prefetch Any data that was returned by the prefetch().

Return Value

mixed

at line 43
protected array getPassthruTokens()

Get a list of tokens whose name and title match the DB fields.

Return Value

array

at line 65
protected array getAliasTokens()

Get alias tokens.

Return Value

array