You are here

function rules_action_execution_callback in Rules 7.2

The execution callback for an action.

It should be placed in any file included by your module or in a file specified using hook_rules_file_info().

Parameters

The callback gets arguments passed as described as parameter in: hook_rules_action_info() as well as an array containing the action's configuration settings.

Return value

array The action may return an array containing parameter or provided variables with their names as key. This is used update the value of a parameter or to provide the value for a provided variable. Apart from that any parameters which have the key 'save' set to TRUE will be remembered to be saved by rules unless the action returns FALSE. Conditions have to return a boolean value in any case.

See also

hook_rules_action_info()

hook_rules_file_info()

Related topics

File

./rules.api.php, line 274
Documentation for hooks provided by the Rules API.

Code

function rules_action_execution_callback($node, $title, $settings) {
  $node->title = $title;
  return array(
    'node' => $node,
  );
}