You are here

public function WatchdogRulesController::eventInfo in Better Watchdog UI 8

Same name and namespace in other branches
  1. 7.3 better_watchdog_ui_rules/better_watchdog_ui_rules.rules.inc \WatchdogRulesController::eventInfo()
  2. 7 better_watchdog_ui_rules/better_watchdog_ui_rules.rules.inc \WatchdogRulesController::eventInfo()
  3. 7.2 better_watchdog_ui_rules/better_watchdog_ui_rules.rules.inc \WatchdogRulesController::eventInfo()

Generate event related info.

File

better_watchdog_ui_rules/better_watchdog_ui_rules.rules.inc, line 27
General better_watchdog_ui related rules integration.

Class

WatchdogRulesController
Controller for generating Rules integration.

Code

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;
}