UsernamePreprocessEventFactory.php in Hook Event Dispatcher 8
File
src/Event/Preprocess/Factory/UsernamePreprocessEventFactory.phpView source
<?php
namespace Drupal\hook_event_dispatcher\Event\Preprocess\Factory;
use Drupal\hook_event_dispatcher\Event\Preprocess\UsernamePreprocessEvent;
use Drupal\hook_event_dispatcher\Event\Preprocess\Variables\UsernameEventVariables;
/**
* Class UsernamePreprocessEventFactory.
*/
final class UsernamePreprocessEventFactory implements PreprocessEventFactoryInterface {
/**
* {@inheritdoc}
*/
public function createEvent(array &$variables) {
return new UsernamePreprocessEvent(new UsernameEventVariables($variables));
}
/**
* {@inheritdoc}
*/
public function getEventHook() {
return UsernamePreprocessEvent::getHook();
}
}
Classes
Name | Description |
---|---|
UsernamePreprocessEventFactory | Class UsernamePreprocessEventFactory. |