You are here

function hook_event_dispatcher_template_preprocess_default_variables_alter in Hook Event Dispatcher 8

Implements hook_template_preprocess_default_variables_alter().

2 calls to hook_event_dispatcher_template_preprocess_default_variables_alter()
TemplatePreprocessDefaultVariablesAlterEventTest::testTemplatePreprocessDefaultVariablesAlterEvent in tests/src/Unit/Theme/TemplatePreprocessDefaultVariablesAlterEventTest.php
TemplatePreprocessDefaultVariablesAlterEvent test.
TemplatePreprocessDefaultVariablesAlterEventTest::testTemplatePreprocessDefaultVariablesAlterEventBySet in tests/src/Unit/Theme/TemplatePreprocessDefaultVariablesAlterEventTest.php
TemplatePreprocessDefaultVariablesAlterEvent by set test.

File

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

Code

function hook_event_dispatcher_template_preprocess_default_variables_alter(&$variables) {

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