You are here

function views_bulk_operations_rules_condition_info in Views Bulk Operations (VBO) 7.3

Implements hook_rules_condition_info().

File

./views_bulk_operations.rules.inc, line 11
Views Bulk Operations conditions and actions for Rules.

Code

function views_bulk_operations_rules_condition_info() {
  $conditions = array();
  $conditions['views_bulk_operations_condition_result_count'] = array(
    'label' => t('Check number of results returned by a VBO View'),
    'parameter' => array(
      'view' => array(
        'type' => 'text',
        'label' => t('View and display'),
        'options list' => 'views_bulk_operations_views_list',
        'description' => t('Select the VBO view and display you want to check'),
        'restriction' => 'input',
      ),
      'args' => array(
        'type' => 'text',
        'label' => t('Arguments'),
        'description' => t('Any arguments to pass to the view, one per line.
          You may use token replacement patterns.'),
        'optional' => TRUE,
      ),
      'minimum' => array(
        'type' => 'integer',
        'label' => t('Minimum number of results'),
        'description' => t('This condition returns TRUE if the view has at
          least the given number of results.'),
      ),
    ),
    'group' => t('Views Bulk Operations'),
  );
  return $conditions;
}