You are here

class ThemeRegistryAlterEvent in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/core_event_dispatcher/src/Event/Theme/ThemeRegistryAlterEvent.php \Drupal\core_event_dispatcher\Event\Theme\ThemeRegistryAlterEvent

Class ThemeRegistryAlterEvent.

Hierarchy

Expanded class hierarchy of ThemeRegistryAlterEvent

2 files declare their use of ThemeRegistryAlterEvent
core_event_dispatcher.module in modules/core_event_dispatcher/core_event_dispatcher.module
Core event dispatcher submodule.
ThemeRegistryAlterEventTest.php in modules/core_event_dispatcher/tests/src/Unit/Theme/ThemeRegistryAlterEventTest.php

File

modules/core_event_dispatcher/src/Event/Theme/ThemeRegistryAlterEvent.php, line 12

Namespace

Drupal\core_event_dispatcher\Event\Theme
View source
class ThemeRegistryAlterEvent extends Event implements EventInterface {

  /**
   * The entire cache of theme registry information, post-processing.
   *
   * @var array
   */
  private $themeRegistry;

  /**
   * ThemeRegistryAlterEvent constructor.
   *
   * @param array &$themeRegistry
   *   The entire cache of theme registry information, post-processing.
   */
  public function __construct(array &$themeRegistry) {
    $this->themeRegistry =& $themeRegistry;
  }

  /**
   * Get theme registry.
   *
   * @return array
   *   The theme registry.
   */
  public function &getThemeRegistry() : array {
    return $this->themeRegistry;
  }

  /**
   * {@inheritdoc}
   */
  public function getDispatcherType() : string {
    return HookEventDispatcherInterface::THEME_REGISTRY_ALTER;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ThemeRegistryAlterEvent::$themeRegistry private property The entire cache of theme registry information, post-processing.
ThemeRegistryAlterEvent::getDispatcherType public function Get the dispatcher type. Overrides EventInterface::getDispatcherType
ThemeRegistryAlterEvent::getThemeRegistry public function Get theme registry.
ThemeRegistryAlterEvent::__construct public function ThemeRegistryAlterEvent constructor.