public function FormPreprocessEventFactory::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/
Event/ Preprocess/ Factory/ FormPreprocessEventFactory.php, line 16
Class
- FormPreprocessEventFactory
- Class FormPreprocessEventFactory.
Namespace
Drupal\hook_event_dispatcher\Event\Preprocess\FactoryCode
public function createEvent(array &$variables) {
return new FormPreprocessEvent(new FormEventVariables($variables));
}