function TriggerActionTestCase::generateMessageWithTokens
Creates a message with tokens.
Parameters
$trigger:
Return value
A message with embedded tokens.
2 calls to TriggerActionTestCase::generateMessageWithTokens()
- TriggerActionTestCase::assignSystemEmailAction in modules/
trigger/ trigger.test - Assigns a system_send_email_action to the passed-in trigger.
- TriggerActionTestCase::assignSystemMessageAction in modules/
trigger/ trigger.test - Assigns a system message action to the passed-in trigger.
File
-
modules/
trigger/ trigger.test, line 270
Class
- TriggerActionTestCase
- Provides a base class with trigger assignments and test comparisons.
Code
function generateMessageWithTokens($trigger) {
// Note that subject is limited to 254 characters in action configuration.
$message = t('Action was triggered by trigger @trigger user:name=[user:name] user:uid=[user:uid] user:mail=[user:mail] user:url=[user:url] user:edit-url=[user:edit-url] user:created=[user:created]', array(
'@trigger' => $trigger,
));
return trim($message);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.