You are here

public function StatusMessagesPreprocessEventFactory::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/StatusMessagesPreprocessEventFactory.php, line 16

Class

StatusMessagesPreprocessEventFactory
Class StatusMessagesPreprocessEventFactory.

Namespace

Drupal\hook_event_dispatcher\Event\Preprocess\Factory

Code

public function createEvent(array &$variables) {
  return new StatusMessagesPreprocessEvent(new StatusMessagesEventVariables($variables));
}