You are here

FieldPreprocessEventFactory.php in Hook Event Dispatcher 8

File

src/Event/Preprocess/Factory/FieldPreprocessEventFactory.php
View source
<?php

namespace Drupal\hook_event_dispatcher\Event\Preprocess\Factory;

use Drupal\hook_event_dispatcher\Event\Preprocess\FieldPreprocessEvent;
use Drupal\hook_event_dispatcher\Event\Preprocess\Variables\FieldEventVariables;

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

  /**
   * {@inheritdoc}
   */
  public function createEvent(array &$variables) {
    return new FieldPreprocessEvent(new FieldEventVariables($variables));
  }

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

}

Classes

Namesort descending Description
FieldPreprocessEventFactory Class FieldPreprocessEventFactory.