You are here

function node_registration_rules_condition_info in Node registration 7

Implements hook_rules_condition_info().

File

includes/node_registration.actions.inc, line 76
Actions, triggers and rules -- callbacks, definitions and hooks.

Code

function node_registration_rules_condition_info() {
  $defaults = array(
    'parameter' => array(
      'node_registration' => array(
        'type' => 'node_registration',
        'label' => t('Node registration'),
      ),
    ),
    'group' => t('Node registration'),
    'access callback' => 'node_registration_rules_integration_access',
  );
  $items['node_registration_is_of_type'] = $defaults + array(
    'label' => t('Node registration is of type'),
    'help' => t('Evaluates to TRUE if the given registration is of one of the selected types.'),
    'base' => 'node_registration_rules_condition_is_of_type',
  );
  $items['node_registration_is_of_type']['parameter']['type'] = array(
    'type' => 'list<text>',
    'label' => t('Node registration types'),
    'options list' => 'node_type_get_names',
    'description' => t('The registration type(s) to check for.'),
    'restriction' => 'input',
  );
  $items['node_registration_is_verified'] = $defaults + array(
    'label' => t('Node registration is verified'),
    'base' => 'node_registration_rules_condition_is_verified',
  );
  $items['node_registration_has_attended'] = $defaults + array(
    'label' => t('Node registration has attended'),
    'base' => 'node_registration_rules_condition_has_attended',
  );
  $items['node_registration_is_cancelled'] = $defaults + array(
    'label' => t('Node registration is cancelled'),
    'base' => 'node_registration_rules_condition_is_cancelled',
  );
  return $items;
}