You are here

function hook_event_dispatcher_views_query_substitutions in Hook Event Dispatcher 8

Implements hook_views_query_substitutions().

1 call to hook_event_dispatcher_views_query_substitutions()
ViewEventTest::testQuerySubstitions in tests/src/Unit/Views/ViewEventTest.php
Query substitutions event.

File

./hook_event_dispatcher.module, line 631
Hook event dispatcher module.

Code

function hook_event_dispatcher_views_query_substitutions(ViewExecutable $view) {

  /** @var \Drupal\hook_event_dispatcher\Manager\HookEventDispatcherManagerInterface $manager */
  $manager = \Drupal::service('hook_event_dispatcher.manager');
  $event = new ViewsQuerySubstitutionsEvent($view);
  $manager
    ->register($event);
  return $event
    ->getSubstitutions();
}