You are here

public static function ExampleViewsEventSubscribers::getSubscribedEvents in Hook Event Dispatcher 8

File

src/Example/ExampleViewsEventSubscribers.php, line 150

Class

ExampleViewsEventSubscribers
Class ExampleViewsEventSubscribers.

Namespace

Drupal\hook_event_dispatcher\Example

Code

public static function getSubscribedEvents() {

  // In order of execution.
  return [
    HookEventDispatcherInterface::VIEWS_PRE_VIEW => 'preView',
    HookEventDispatcherInterface::VIEWS_PRE_BUILD => 'preBuild',
    HookEventDispatcherInterface::VIEWS_QUERY_ALTER => 'queryAlter',
    HookEventDispatcherInterface::VIEWS_QUERY_SUBSTITUTIONS => 'querySubstitutions',
    HookEventDispatcherInterface::VIEWS_POST_BUILD => 'postBuild',
    HookEventDispatcherInterface::VIEWS_PRE_EXECUTE => 'preExecute',
    HookEventDispatcherInterface::VIEWS_POST_EXECUTE => 'postExecute',
    HookEventDispatcherInterface::VIEWS_PRE_RENDER => 'preRender',
    HookEventDispatcherInterface::VIEWS_POST_RENDER => 'postRender',
  ];
}