You are here

function workbench_moderation_set_state_during_save_rules_action in Workbench Moderation 7.3

Same name and namespace in other branches
  1. 7 workbench_moderation.rules.inc \workbench_moderation_set_state_during_save_rules_action()

Action: Set the moderation state on a node object.

This should only be used in a process where this node object will later be saved.

$param $node A node object

$param $moderation_state The desired moderation state to assign.

Return value

An array containing the node object stored in the key called 'node'.

1 string reference to 'workbench_moderation_set_state_during_save_rules_action'
workbench_moderation_rules_action_info in ./workbench_moderation.rules.inc
Implements hook_rules_action_info() on behalf of the workbench_moderation module.

File

./workbench_moderation.rules.inc, line 325

Code

function workbench_moderation_set_state_during_save_rules_action($node, $moderation_state) {
  $node->workbench_moderation_state_new = $moderation_state;
  return array(
    'node' => $node,
  );
}