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