You are here

public function CommentPreprocessEventFactory::createEvent in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/preprocess_event_dispatcher/src/Factory/CommentPreprocessEventFactory.php \Drupal\preprocess_event_dispatcher\Factory\CommentPreprocessEventFactory::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/CommentPreprocessEventFactory.php, line 17

Class

CommentPreprocessEventFactory
Class CommentPreprocessEventFactory.

Namespace

Drupal\preprocess_event_dispatcher\Factory

Code

public function createEvent(array &$variables) : AbstractPreprocessEvent {
  return new CommentPreprocessEvent(new CommentEventVariables($variables));
}