You are here

function hook_event_dispatcher_page_top in Hook Event Dispatcher 8

Implements hook_page_top().

2 calls to hook_event_dispatcher_page_top()
PageTopEventTest::testPageTopEventByReference in tests/src/Unit/Page/PageTopEventTest.php
Test the PageTopEvent by reference.
PageTopEventTest::testPageTopEventBySet in tests/src/Unit/Page/PageTopEventTest.php
Test the PageTopEvent by set.

File

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

Code

function hook_event_dispatcher_page_top(array &$pageTop) {

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