You are here

abstract class AbstractPreprocessEvent in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/preprocess_event_dispatcher/src/Event/AbstractPreprocessEvent.php \Drupal\preprocess_event_dispatcher\Event\AbstractPreprocessEvent

Class AbstractPreprocessEvent.

Plugin annotation

@SuppressWarnings(PHPMD . NumberOfChildren);

Hierarchy

Expanded class hierarchy of AbstractPreprocessEvent

23 files declare their use of AbstractPreprocessEvent
BlockPreprocessEventFactory.php in modules/preprocess_event_dispatcher/src/Factory/BlockPreprocessEventFactory.php
CommentPreprocessEventFactory.php in modules/preprocess_event_dispatcher/src/Factory/CommentPreprocessEventFactory.php
EckEntityPreprocessEventFactory.php in modules/preprocess_event_dispatcher/src/Factory/EckEntityPreprocessEventFactory.php
EntityEventVariablesTest.php in modules/preprocess_event_dispatcher/tests/src/Unit/EntityEventVariablesTest.php
ExamplePreprocessEvent.php in examples/preprocess_example_module/src/Event/ExamplePreprocessEvent.php

... See full list

File

modules/preprocess_event_dispatcher/src/Event/AbstractPreprocessEvent.php, line 13

Namespace

Drupal\preprocess_event_dispatcher\Event
View source
abstract class AbstractPreprocessEvent extends Event implements PreprocessEventInterface {

  /**
   * Event variables.
   *
   * @var \Drupal\preprocess_event_dispatcher\Variables\AbstractEventVariables
   */
  protected $variables;

  /**
   * PreprocessEvent constructor.
   *
   * @param \Drupal\preprocess_event_dispatcher\Variables\AbstractEventVariables $variables
   *   The variables.
   */
  public function __construct(AbstractEventVariables $variables) {
    $this->variables = $variables;
  }

  /**
   * {@inheritdoc}
   */
  public static function name() : string {
    return static::DISPATCH_NAME_PREFIX . static::getHook();
  }

  /**
   * {@inheritdoc}
   */
  public function getVariables() : AbstractEventVariables {
    return $this->variables;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AbstractPreprocessEvent::$variables protected property Event variables.
AbstractPreprocessEvent::getVariables public function Get the variables. Overrides PreprocessEventInterface::getVariables
AbstractPreprocessEvent::name public static function Get the Event name. Overrides PreprocessEventInterface::name 1
AbstractPreprocessEvent::__construct public function PreprocessEvent constructor.
PreprocessEventInterface::DISPATCH_NAME_PREFIX public constant
PreprocessEventInterface::getHook public static function Get the hook name. 18