public function ExamplePreprocessEventFactory::createEvent in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 examples/preprocess_example_module/src/Factory/ExamplePreprocessEventFactory.php \Drupal\preprocess_example_module\Factory\ExamplePreprocessEventFactory::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
- examples/
preprocess_example_module/ src/ Factory/ ExamplePreprocessEventFactory.php, line 24
Class
- ExamplePreprocessEventFactory
- Class ExamplePreprocessEventFactory.
Namespace
Drupal\preprocess_example_module\FactoryCode
public function createEvent(array &$variables) : AbstractPreprocessEvent {
return new ExamplePreprocessEvent(new ExampleEventVariables($variables));
}