You are here

final class CommentPreprocessEventFactory in Hook Event Dispatcher 8

Class CommentPreprocessEventFactory.

Hierarchy

Expanded class hierarchy of CommentPreprocessEventFactory

1 string reference to 'CommentPreprocessEventFactory'
hook_event_dispatcher.services.yml in ./hook_event_dispatcher.services.yml
hook_event_dispatcher.services.yml
1 service uses CommentPreprocessEventFactory
preprocess_event.factory.comment in ./hook_event_dispatcher.services.yml
Drupal\hook_event_dispatcher\Event\Preprocess\Factory\CommentPreprocessEventFactory

File

src/Event/Preprocess/Factory/CommentPreprocessEventFactory.php, line 11

Namespace

Drupal\hook_event_dispatcher\Event\Preprocess\Factory
View source
final class CommentPreprocessEventFactory implements PreprocessEventFactoryInterface {

  /**
   * {@inheritdoc}
   */
  public function createEvent(array &$variables) {
    return new CommentPreprocessEvent(new CommentEventVariables($variables));
  }

  /**
   * {@inheritdoc}
   */
  public function getEventHook() {
    return CommentPreprocessEvent::getHook();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CommentPreprocessEventFactory::createEvent public function Create the PreprocessEvent with the Variables object embedded. Overrides PreprocessEventFactoryInterface::createEvent
CommentPreprocessEventFactory::getEventHook public function Get the Event hook name. Overrides PreprocessEventFactoryInterface::getEventHook