You are here

final class ViewPreprocessEventFactory in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/preprocess_event_dispatcher/src/Factory/ViewPreprocessEventFactory.php \Drupal\preprocess_event_dispatcher\Factory\ViewPreprocessEventFactory

Class ViewPreprocessEventFactory.

Hierarchy

Expanded class hierarchy of ViewPreprocessEventFactory

1 string reference to 'ViewPreprocessEventFactory'
preprocess_event_dispatcher.services.yml in modules/preprocess_event_dispatcher/preprocess_event_dispatcher.services.yml
modules/preprocess_event_dispatcher/preprocess_event_dispatcher.services.yml
1 service uses ViewPreprocessEventFactory
preprocess_event.factory.view in modules/preprocess_event_dispatcher/preprocess_event_dispatcher.services.yml
Drupal\preprocess_event_dispatcher\Factory\ViewPreprocessEventFactory

File

modules/preprocess_event_dispatcher/src/Factory/ViewPreprocessEventFactory.php, line 12

Namespace

Drupal\preprocess_event_dispatcher\Factory
View source
final class ViewPreprocessEventFactory implements PreprocessEventFactoryInterface {

  /**
   * {@inheritdoc}
   */
  public function createEvent(array &$variables) : AbstractPreprocessEvent {
    return new ViewPreprocessEvent(new ViewEventVariables($variables));
  }

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

}

Members

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