function better_watchdog_ui_rules_rules_condition_info in Better Watchdog UI 7.3
Same name and namespace in other branches
- 7.2 better_watchdog_ui_rules/better_watchdog_ui_rules.rules.inc \better_watchdog_ui_rules_rules_condition_info()
Implements hook_rules_condition_info().
File
- better_watchdog_ui_rules/
better_watchdog_ui_rules.rules.inc, line 70 - General better_watchdog_ui related rules integration.
Code
function better_watchdog_ui_rules_rules_condition_info() {
$conditions = array();
$conditions['better_watchdog_ui_rules_condition_watchdog_severity'] = array(
'label' => t('Watchdog severity is'),
'group' => t('Better Watchdog UI'),
'parameter' => array(
'better_watchdog_ui_watchdog' => array(
'type' => 'better_watchdog_ui_watchdog',
'label' => t('Watchdog'),
'description' => t('Specifies the database log entry for which to evaluate the condition.'),
),
'severity' => array(
'type' => 'list<integer>',
'label' => t('Severity'),
'options list' => 'watchdog_severity_levels',
),
),
);
$conditions['better_watchdog_ui_rules_condition_watchdog_type'] = array(
'label' => t('Watchdog type is'),
'group' => t('Better Watchdog UI'),
'parameter' => array(
'better_watchdog_ui_watchdog' => array(
'type' => 'better_watchdog_ui_watchdog',
'label' => t('Watchdog'),
'description' => t('Specifies the database log entry for which to evaluate the condition.'),
),
'type' => array(
'type' => 'text',
'label' => t('Type'),
'description' => t('A list of types separated by either a newline or a comma.'),
),
),
);
$conditions['better_watchdog_ui_rules_condition_watchdog_message'] = array(
'label' => t('Watchdog message contains'),
'group' => t('Better Watchdog UI'),
'parameter' => array(
'better_watchdog_ui_watchdog' => array(
'type' => 'better_watchdog_ui_watchdog',
'label' => t('Watchdog'),
'description' => t('Specifies the database log entry for which to evaluate the condition.'),
),
'message' => array(
'type' => 'text',
'label' => t('Message'),
'description' => t('Newline separated list of text fragments to look for.'),
),
),
);
$conditions['better_watchdog_ui_rules_condition_watchdog_uid'] = array(
'label' => t('Watchdog user is'),
'group' => t('Better Watchdog UI'),
'parameter' => array(
'better_watchdog_ui_watchdog' => array(
'type' => 'better_watchdog_ui_watchdog',
'label' => t('Watchdog'),
'description' => t('Specifies the database log entry for which to evaluate the condition.'),
),
'accounts' => array(
'type' => 'text',
'label' => t('User list'),
'description' => t('Newline separated list of usernames.'),
'optional' => TRUE,
),
'include_anonymus' => array(
'type' => 'text',
'label' => t('Include anonymus?'),
'options list' => '_better_watchdog_ui_yes_no_options_list',
'default value' => 0,
),
),
);
$conditions['better_watchdog_ui_rules_condition_watchdog_location'] = array(
'label' => t('Watchdog location is'),
'group' => t('Better Watchdog UI'),
'parameter' => array(
'better_watchdog_ui_watchdog' => array(
'type' => 'better_watchdog_ui_watchdog',
'label' => t('Watchdog'),
'description' => t('Specifies the database log entry for which to evaluate the condition.'),
),
'location' => array(
'type' => 'text',
'label' => t('Location'),
'description' => t('Newline separated list of urls.'),
),
),
);
$conditions['better_watchdog_ui_rules_condition_watchdog_referer'] = array(
'label' => t('Watchdog referer is'),
'group' => t('Better Watchdog UI'),
'parameter' => array(
'better_watchdog_ui_watchdog' => array(
'type' => 'better_watchdog_ui_watchdog',
'label' => t('Watchdog'),
'description' => t('Specifies the database log entry for which to evaluate the condition.'),
),
'referer' => array(
'type' => 'text',
'label' => t('referer'),
'description' => t('Newline separated list of urls.'),
),
),
);
$conditions['better_watchdog_ui_rules_condition_watchdog_hostname'] = array(
'label' => t('Watchdog hostname is'),
'group' => t('Better Watchdog UI'),
'parameter' => array(
'better_watchdog_ui_watchdog' => array(
'type' => 'better_watchdog_ui_watchdog',
'label' => t('Watchdog'),
'description' => t('Specifies the database log entry for which to evaluate the condition.'),
),
'hostname' => array(
'type' => 'text',
'label' => t('Hostname'),
'description' => t('Newline separated list of hostnames.'),
),
),
);
return $conditions;
}