You are here

HtmlPreprocessEventFactory.php in Hook Event Dispatcher 8.2

File

modules/preprocess_event_dispatcher/src/Factory/HtmlPreprocessEventFactory.php
View source
<?php

namespace Drupal\preprocess_event_dispatcher\Factory;

use Drupal\preprocess_event_dispatcher\Event\AbstractPreprocessEvent;
use Drupal\preprocess_event_dispatcher\Event\HtmlPreprocessEvent;
use Drupal\preprocess_event_dispatcher\Variables\HtmlEventVariables;

/**
 * Class HtmlPreprocessEventFactory.
 */
final class HtmlPreprocessEventFactory implements PreprocessEventFactoryInterface {

  /**
   * {@inheritdoc}
   */
  public function createEvent(array &$variables) : AbstractPreprocessEvent {
    return new HtmlPreprocessEvent(new HtmlEventVariables($variables));
  }

  /**
   * {@inheritdoc}
   */
  public function getEventHook() : string {
    return HtmlPreprocessEvent::getHook();
  }

}

Classes

Namesort descending Description
HtmlPreprocessEventFactory Class HtmlPreprocessEventFactory.