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