You are here

abstract class AbstractPreprocessEvent in Hook Event Dispatcher 8

Class AbstractPreprocessEvent.

Plugin annotation

@SuppressWarnings(PHPMD . NumberOfChildren);

Hierarchy

Expanded class hierarchy of AbstractPreprocessEvent

4 files declare their use of AbstractPreprocessEvent
EntityEventVariablesTest.php in tests/src/Unit/Preprocess/EntityEventVariablesTest.php
ExamplePreprocessEvent.php in src/Example/preprocess_example_module/src/Event/ExamplePreprocessEvent.php
FakePreprocessEvent.php in tests/src/Unit/Preprocess/Helpers/FakePreprocessEvent.php
OtherEventVariablesTest.php in tests/src/Unit/Preprocess/OtherEventVariablesTest.php

File

src/Event/Preprocess/AbstractPreprocessEvent.php, line 13

Namespace

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

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

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

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

  /**
   * {@inheritdoc}
   */
  public function getVariables() {
    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 1
AbstractPreprocessEvent::name public static function Get the Event name. Overrides PreprocessEventInterface::name 1
AbstractPreprocessEvent::__construct public function PreprocessEvent constructor.
PreprocessEventInterface::DISPATCH_NAME_PREFIX constant
PreprocessEventInterface::getHook public static function Get the hook name. 18