You are here

public static function ApigeeEdgeActionsDebugEventSubscriber::getSubscribedEvents in Apigee Edge 8

File

modules/apigee_edge_actions/modules/apigee_edge_actions_debug/src/EventSubscriber/ApigeeEdgeActionsDebugEventSubscriber.php, line 68

Class

ApigeeEdgeActionsDebugEventSubscriber
Implements event subscriber for all apigee_edge_actions events.

Namespace

Drupal\apigee_edge_actions_debug\EventSubscriber

Code

public static function getSubscribedEvents() {

  // Ensure this is called after the container is built.
  if (!\Drupal::hasService('state')) {
    return [];
  }
  $events = [];

  // Register a callback for all registered rules events.
  if ($rules_events = \Drupal::state()
    ->get('rules.registered_events')) {
    foreach ($rules_events as $rules_event) {
      $events[$rules_event][] = [
        'onRulesEvent',
        100,
      ];
    }
  }
  return $events;
}