class WatchdogRulesController in Better Watchdog UI 8
Same name and namespace in other branches
- 7.3 better_watchdog_ui_rules/better_watchdog_ui_rules.rules.inc \WatchdogRulesController
- 7 better_watchdog_ui_rules/better_watchdog_ui_rules.rules.inc \WatchdogRulesController
- 7.2 better_watchdog_ui_rules/better_watchdog_ui_rules.rules.inc \WatchdogRulesController
Controller for generating Rules integration.
Hierarchy
- class \WatchdogRulesController
Expanded class hierarchy of WatchdogRulesController
1 string reference to 'WatchdogRulesController'
- better_watchdog_ui_rules_entity_info_alter in better_watchdog_ui_rules/
better_watchdog_ui_rules.module - Implements hook_entity_info_alter().
File
- better_watchdog_ui_rules/
better_watchdog_ui_rules.rules.inc, line 11 - General better_watchdog_ui related rules integration.
View source
class WatchdogRulesController {
protected $type;
protected $info;
/**
* Constructor.
*/
public function __construct() {
$this->type = 'better_watchdog_ui_watchdog';
$this->info = entity_get_info('better_watchdog_ui_watchdog');
}
/**
* Generate event related info.
*/
public function eventInfo() {
$type = $this->type;
$defaults = array(
'module' => 'better_watchdog_ui',
'group' => 'Better Watchdog UI',
'access callback' => 'access site reports',
);
$items['better_watchdog_ui_watchdog_view'] = $defaults + array(
'label' => t('A watchdog entry is viewed'),
'variables' => entity_rules_events_variables($type, t('viewed better_watchdog_ui_watchdog')),
);
$items['better_watchdog_ui_watchdog_create'] = $defaults + array(
'label' => t('After saving a new watchdog entry'),
'variables' => entity_rules_events_variables($type, t('created better_watchdog_ui_watchdog')),
);
$items['better_watchdog_ui_watchdog_before_delete'] = $defaults + array(
'label' => t('Before deleting a watchdog entry'),
'variables' => entity_rules_events_variables($type, t('before deleted better_watchdog_ui_watchdog')),
);
$items['better_watchdog_ui_watchdog_after_delete'] = $defaults + array(
'label' => t('After deleting a watchdog entry'),
'variables' => entity_rules_events_variables($type, t('after deleted better_watchdog_ui_watchdog')),
);
return $items;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
WatchdogRulesController:: |
protected | property | ||
WatchdogRulesController:: |
protected | property | ||
WatchdogRulesController:: |
public | function | Generate event related info. | |
WatchdogRulesController:: |
public | function | Constructor. |