You are here

public function ExamplePreprocessEventFactory::createEvent in Hook Event Dispatcher 8

Create the PreprocessEvent with the Variables object embedded.

Parameters

array $variables: Variables.

Return value

\Drupal\hook_event_dispatcher\Event\Preprocess\AbstractPreprocessEvent Created event.

Overrides PreprocessEventFactoryInterface::createEvent

File

src/Example/preprocess_example_module/src/Event/Factory/ExamplePreprocessEventFactory.php, line 23

Class

ExamplePreprocessEventFactory
Class ExamplePreprocessEventFactory.

Namespace

Drupal\preprocess_example_module\Event\Factory

Code

public function createEvent(array &$variables) {
  return new ExamplePreprocessEvent(new ExampleEventVariables($variables));
}