You are here

function workbench_moderation_rules_condition_info in Workbench Moderation 7.3

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

Implements hook_rules_condition_info().

File

./workbench_moderation.rules.inc, line 16

Code

function workbench_moderation_rules_condition_info() {
  $items = array();
  $items['content_is_using_workbench_moderation'] = array(
    'group' => t("Node"),
    'label' => t("Content is using workbench moderation"),
    'base' => 'workbench_access_rules_condition_content_is_using_workbench_moderation',
    'parameter' => array(
      'node' => array(
        'type' => 'node',
        'label' => t("Content"),
      ),
    ),
    'access callback' => 'rules_node_integration_access',
  );
  $items['content_is_live_revision'] = array(
    'group' => t("Node"),
    'label' => t("Content is live revision"),
    'base' => 'workbench_moderation_rules_condition_content_is_live_revision',
    'parameter' => array(
      'node' => array(
        'type' => 'node',
        'label' => t("Content"),
      ),
    ),
    'access callback' => 'rules_node_integration_access',
  );
  $items['contents_current_state'] = array(
    'group' => t("Node"),
    'label' => t("Content's current moderation state"),
    'base' => 'workbench_moderation_rules_condition_contents_current_state',
    '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',
        'save' => TRUE,
      ),
    ),
    'access callback' => 'rules_node_integration_access',
  );
  $items['contents_previous_state'] = array(
    'group' => t("Node"),
    'label' => t("Content's previous moderation state"),
    'base' => 'workbench_moderation_rules_condition_contents_previous_state',
    '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',
        'save' => TRUE,
      ),
    ),
    'access callback' => 'rules_node_integration_access',
  );
  return $items;
}