You are here

public function FormPreprocessEventFactory::createEvent in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x modules/preprocess_event_dispatcher/src/Factory/FormPreprocessEventFactory.php \Drupal\preprocess_event_dispatcher\Factory\FormPreprocessEventFactory::createEvent()

Create the PreprocessEvent with the Variables object embedded.

Parameters

array $variables: Variables.

Return value

\Drupal\preprocess_event_dispatcher\Event\AbstractPreprocessEvent Created event.

Overrides PreprocessEventFactoryInterface::createEvent

File

modules/preprocess_event_dispatcher/src/Factory/FormPreprocessEventFactory.php, line 17

Class

FormPreprocessEventFactory
Class FormPreprocessEventFactory.

Namespace

Drupal\preprocess_event_dispatcher\Factory

Code

public function createEvent(array &$variables) : AbstractPreprocessEvent {
  return new FormPreprocessEvent(new FormEventVariables($variables));
}