You are here

function hook_event_dispatcher_views_data in Hook Event Dispatcher 8

Implements hook_views_data().

2 calls to hook_event_dispatcher_views_data()
ViewDataEventTest::testViewsDataEvent in tests/src/Unit/Views/ViewDataEventTest.php
ViewsDataEvent test.
ViewDataEventTest::testViewsDataEventMultipleAdds in tests/src/Unit/Views/ViewDataEventTest.php
ViewsDataEvent multiple adds test.

File

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

Code

function hook_event_dispatcher_views_data() {

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