public function ExamplePreprocessEventFactory::createEvent in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x 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));
}