function workbench_moderation_load_current_state_rules_action in Workbench Moderation 7
Same name and namespace in other branches
- 7.3 workbench_moderation.rules.inc \workbench_moderation_load_current_state_rules_action()
Action: Loads the workbench access states into a variable.
$param $node A node object
Return value
An array containing the node object stored in the key called 'node' and an array containing the access control states for the given node.
1 string reference to 'workbench_moderation_load_current_state_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 341
Code
function workbench_moderation_load_current_state_rules_action($node) {
$state = '';
if (is_object($node) && property_exists($node, 'workbench_moderation') && isset($node->workbench_moderation['current'])) {
$state = $node->workbench_moderation['current'];
}
return array(
'node' => $node,
'workbench_moderation_state' => $state,
);
}