You are here

public static function ExampleViewsEventSubscribers::getSubscribedEvents in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 examples/ExampleViewsEventSubscribers.php \Drupal\hook_event_dispatcher\ExampleViewsEventSubscribers::getSubscribedEvents()

File

examples/ExampleViewsEventSubscribers.php, line 147

Class

ExampleViewsEventSubscribers
Class ExampleViewsEventSubscribers.

Namespace

Drupal\hook_event_dispatcher

Code

public static function getSubscribedEvents() : array {
  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',
  ];
}