NodePreprocessEventFactory.php in Hook Event Dispatcher 8.2
Same filename and directory in other branches
File
modules/preprocess_event_dispatcher/src/Factory/NodePreprocessEventFactory.phpView source
<?php
namespace Drupal\preprocess_event_dispatcher\Factory;
use Drupal\preprocess_event_dispatcher\Event\AbstractPreprocessEvent;
use Drupal\preprocess_event_dispatcher\Event\NodePreprocessEvent;
use Drupal\preprocess_event_dispatcher\Variables\NodeEventVariables;
/**
* Class NodePreprocessEventFactory.
*/
final class NodePreprocessEventFactory implements PreprocessEventFactoryInterface {
/**
* {@inheritdoc}
*/
public function createEvent(array &$variables) : AbstractPreprocessEvent {
return new NodePreprocessEvent(new NodeEventVariables($variables));
}
/**
* {@inheritdoc}
*/
public function getEventHook() : string {
return NodePreprocessEvent::getHook();
}
}
Classes
Name | Description |
---|---|
NodePreprocessEventFactory | Class NodePreprocessEventFactory. |