You are here

PagePreprocessEventFactory.php in Hook Event Dispatcher 8

File

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

namespace Drupal\hook_event_dispatcher\Event\Preprocess\Factory;

use Drupal\hook_event_dispatcher\Event\Preprocess\PagePreprocessEvent;
use Drupal\hook_event_dispatcher\Event\Preprocess\Variables\PageEventVariables;

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

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

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

}

Classes

Namesort descending Description
PagePreprocessEventFactory Class PagePreprocessEventFactory.