You are here

ParagraphPreprocessEventFactory.php in Hook Event Dispatcher 8

File

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

namespace Drupal\hook_event_dispatcher\Event\Preprocess\Factory;

use Drupal\hook_event_dispatcher\Event\Preprocess\ParagraphPreprocessEvent;
use Drupal\hook_event_dispatcher\Event\Preprocess\Variables\ParagraphEventVariables;

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

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

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

}

Classes

Namesort descending Description
ParagraphPreprocessEventFactory Class ParagraphPreprocessEventFactory.