You are here

function _workflow_rules_workflow_check_transition in Workflow 7

Condition implementation: check state transition.

Parameters

$node : the node with the new values. Other entity types are not supported.:

: array $old_sids : an array of old sids to meet the condition.:

: array $new_sids : an array of new sids to meet the condition.:

: array $condition: a RulesCondition->settings array.:

1 string reference to '_workflow_rules_workflow_check_transition'
_workflow_rules_rules_node_condition_info in workflow_rules/workflow_rules.node.inc
Implements subfunction of hook_rules_condition_info().

File

workflow_rules/workflow_rules.rules.inc, line 114
Rules integration for the Workflow module

Code

function _workflow_rules_workflow_check_transition($node, array $old_sids, array $new_sids, array $condition) {
  $old_sid = workflow_node_previous_state($node);
  $new_sid = workflow_node_current_state($node);
  return _workflow_rules_workflow_check_given_state($old_sid, $old_sids) && _workflow_rules_workflow_check_given_state($new_sid, $new_sids);
}