You are here

function workflow_select_given_state_action in Workflow 5.2

Same name and namespace in other branches
  1. 6.2 workflow_actions/workflow_actions.module \workflow_select_given_state_action()
  2. 6 workflow_actions/workflow_actions.module \workflow_select_given_state_action()

Implementation of a Drupal action. Move a node to a specified state.

File

./workflow.module, line 709

Code

function workflow_select_given_state_action($node, $context) {
  $comment = t($context['workflow_comment'], array(
    '%title' => check_plain($node->title),
    '%state' => check_plain($context['state_name']),
  ));
  workflow_execute_transition($node, $context['target_sid'], $comment, $context['force']);
}