FieldPreprocessEventFactory.php in Hook Event Dispatcher 8
File
src/Event/Preprocess/Factory/FieldPreprocessEventFactory.phpView 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
| Name   | Description | 
|---|---|
| FieldPreprocessEventFactory | Class FieldPreprocessEventFactory. | 
