You are here

function _workflow_rules_rules_node_action_info in Workflow 7

Implements subfunction of hook_rules_action_info().

1 call to _workflow_rules_rules_node_action_info()
workflow_rules_rules_action_info in workflow_rules/workflow_rules.rules.inc
Implements hook_rules_action_info().

File

workflow_rules/workflow_rules.node.inc, line 87
Rules integration for the Workflow module with Node API

Code

function _workflow_rules_rules_node_action_info() {
  return array(
    'workflow_rules_set_state' => array(
      'group' => t('Workflow'),
      'label' => t('Set workflow state for content'),
      'parameter' => array(
        'node' => array(
          'type' => 'node',
          'label' => t('Node'),
          'description' => t('The node to set the current workflow state of.'),
        ),
        'workflow_state' => array(
          'type' => 'list<integer>',
          'label' => t('New workflow state'),
          'options list' => '_workflow_rules_workflow_get_options',
          'description' => t('The workflow state to set (select only one).'),
        ),
        'workflow_comment' => array(
          'type' => 'text',
          'label' => t('Workflow Comment'),
          'description' => t('The workflow comment to set.'),
          'optional' => TRUE,
        ),
      ),
      'base' => '_workflow_rules_node_set_state',
      'callbacks' => array(
        'execute' => '_workflow_rules_node_set_state',
      ),
    ),
  );
}