You are here

function workbench_moderation_rules_action_info in Workbench Moderation 7.3

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

Implements hook_rules_action_info() on behalf of the workbench_moderation module.

File

./workbench_moderation.rules.inc, line 116

Code

function workbench_moderation_rules_action_info() {
  $items = array();
  $items['workbench_moderation_set_state_during_save'] = array(
    'label' => t("Set moderation state during save"),
    'group' => t("Node"),
    'base' => 'workbench_moderation_set_state_during_save_rules_action',
    'parameter' => array(
      'node' => array(
        'type' => 'node',
        'label' => t("Content"),
      ),
      'moderation_state' => array(
        'type' => 'text',
        'label' => t("Workbench moderation state"),
        'options list' => 'workbench_moderation_state_labels',
        'restriction' => 'input',
      ),
    ),
  );
  $items['workbench_moderation_set_state'] = array(
    'label' => t("Set moderation state"),
    'group' => t("Node"),
    'base' => 'workbench_moderation_set_state_rules_action',
    'parameter' => array(
      'node' => array(
        'type' => 'node',
        'label' => t("Content"),
      ),
      'moderation_state' => array(
        'type' => 'text',
        'label' => t("Workbench moderation state"),
        'options list' => 'workbench_moderation_state_labels',
        'restriction' => 'input',
      ),
      'force_transition' => array(
        'type' => 'boolean',
        'label' => t("Force transition"),
        'restriction' => 'input',
      ),
    ),
  );
  $items['workbench_moderation_load_current_state'] = array(
    'label' => t("Load current moderation state"),
    'group' => t("Node"),
    'base' => 'workbench_moderation_load_current_state_rules_action',
    'parameter' => array(
      'node' => array(
        'type' => 'node',
        'label' => t("Content"),
      ),
    ),
    'provides' => array(
      'workbench_moderation_state' => array(
        'type' => 'unknown',
        'label' => t("Workbench moderation state"),
      ),
    ),
  );
  $items['workbench_moderation_load_current_revision'] = array(
    'label' => t("Load current node revision"),
    'group' => t("Node"),
    'base' => 'workbench_moderation_load_current_revision_rules_action',
    'parameter' => array(
      'node' => array(
        'type' => 'node',
        'label' => t("Content"),
      ),
    ),
    'provides' => array(
      'node_revision' => array(
        'type' => 'node',
        'label' => t("Current node revision"),
      ),
    ),
  );
  return $items;
}