You are here

final class UsernamePreprocessEventFactory in Hook Event Dispatcher 8

Class UsernamePreprocessEventFactory.

Hierarchy

Expanded class hierarchy of UsernamePreprocessEventFactory

1 string reference to 'UsernamePreprocessEventFactory'
hook_event_dispatcher.services.yml in ./hook_event_dispatcher.services.yml
hook_event_dispatcher.services.yml
1 service uses UsernamePreprocessEventFactory
preprocess_event.factory.username in ./hook_event_dispatcher.services.yml
Drupal\hook_event_dispatcher\Event\Preprocess\Factory\UsernamePreprocessEventFactory

File

src/Event/Preprocess/Factory/UsernamePreprocessEventFactory.php, line 11

Namespace

Drupal\hook_event_dispatcher\Event\Preprocess\Factory
View source
final class UsernamePreprocessEventFactory implements PreprocessEventFactoryInterface {

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

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

}

Members

Namesort descending Modifiers Type Description Overrides
UsernamePreprocessEventFactory::createEvent public function Create the PreprocessEvent with the Variables object embedded. Overrides PreprocessEventFactoryInterface::createEvent
UsernamePreprocessEventFactory::getEventHook public function Get the Event hook name. Overrides PreprocessEventFactoryInterface::getEventHook