Error message

You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).

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.