You are here

function hook_event_dispatcher_theme in Hook Event Dispatcher 8

Implements hook_theme().

4 calls to hook_event_dispatcher_theme()
ThemeEventTest::testThemeEventWithAddNewTheme in tests/src/Unit/Theme/ThemeEventTest.php
ThemeEvent with addNewTheme test.
ThemeEventTest::testThemeEventWithAddNewThemes in tests/src/Unit/Theme/ThemeEventTest.php
ThemeEvent with addNewThemes test.
ThemeEventTest::testThemeEventWithAddNewThemesPathException in tests/src/Unit/Theme/ThemeEventTest.php
ThemeEvent with addNewThemes test.
ThemeEventTest::testThemeEventWithAddNewThemeWithPathException in tests/src/Unit/Theme/ThemeEventTest.php
ThemeEvent with addNewTheme test.

File

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

Code

function hook_event_dispatcher_theme(array $existing) {

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