You are here

function revisioning_rules_condition_info in Revisioning 8

Same name and namespace in other branches
  1. 6.4 revisioning.rules.inc \revisioning_rules_condition_info()
  2. 6.3 revisioning.rules.inc \revisioning_rules_condition_info()
  3. 7 revisioning.rules.inc \revisioning_rules_condition_info()

Implements hook_rules_condition_info().

File

./revisioning.rules.inc, line 130
Rules integration for Revisioning module.

Code

function revisioning_rules_condition_info() {
  $defaults = array(
    'group' => t('Revisioning'),
    'parameter' => array(
      'node' => array(
        'type' => 'node',
        'label' => t('Content'),
      ),
    ),
  );
  $items['revisioning_node_has_pending'] = $defaults + array(
    'label' => t('Content has pending revision'),
    'help' => t('Evaluates to TRUE, if the content has one or more pending revisions.'),
    'module' => 'revisioning',
  );
  $items['revisioning_condition_revision_is'] = $defaults + array(
    'label' => t('Content revision state'),
    'help' => t('Evaluates to TRUE, if the revision is in one of the selected states.'),
    'module' => 'revisioning',
    'base' => 'revisioning_condition_revision_is',
  );
  $items['revisioning_condition_revision_is']['parameter']['revision_type'] = array(
    'type' => 'list<text>',
    'label' => t('Is one of'),
    'options list' => 'revisioning_revision_states_all',
    'description' => t('The content state(s) to check for.'),
  );
  return $items;
}