final class TemplatePreprocessDefaultVariablesAlterEvent in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/core_event_dispatcher/src/Event/Theme/TemplatePreprocessDefaultVariablesAlterEvent.php \Drupal\core_event_dispatcher\Event\Theme\TemplatePreprocessDefaultVariablesAlterEvent
Class TemplatePreprocessDefaultVariablesAlterEvent.
Hierarchy
- class \Drupal\core_event_dispatcher\Event\Theme\TemplatePreprocessDefaultVariablesAlterEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of TemplatePreprocessDefaultVariablesAlterEvent
2 files declare their use of TemplatePreprocessDefaultVariablesAlterEvent
- core_event_dispatcher.module in modules/
core_event_dispatcher/ core_event_dispatcher.module - Core event dispatcher submodule.
- TemplatePreprocessDefaultVariablesAlterEventTest.php in modules/
core_event_dispatcher/ tests/ src/ Unit/ Theme/ TemplatePreprocessDefaultVariablesAlterEventTest.php
File
- modules/
core_event_dispatcher/ src/ Event/ Theme/ TemplatePreprocessDefaultVariablesAlterEvent.php, line 12
Namespace
Drupal\core_event_dispatcher\Event\ThemeView source
final class TemplatePreprocessDefaultVariablesAlterEvent extends Event implements EventInterface {
/**
* Default template variables.
*
* @var array
*/
private $variables;
/**
* TemplatePreprocessDefaultVariablesAlterEvent constructor.
*
* @param array $variables
* The associative array of default template variables, as set up by
* _template_preprocess_default_variables(). Passed by reference.
*
* @see hook_template_preprocess_default_variables_alter()
*/
public function __construct(array &$variables) {
$this->variables =& $variables;
}
/**
* Get the dispatcher type.
*
* @return string
* The dispatcher type.
*/
public function getDispatcherType() : string {
return HookEventDispatcherInterface::TEMPLATE_PREPROCESS_DEFAULT_VARIABLES_ALTER;
}
/**
* Get the default template variables by reference.
*
* @return array
* The associative array of default template variables, as set up by
* _template_preprocess_default_variables(). Passed by reference.
*/
public function &getVariables() : array {
return $this->variables;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TemplatePreprocessDefaultVariablesAlterEvent:: |
private | property | Default template variables. | |
TemplatePreprocessDefaultVariablesAlterEvent:: |
public | function |
Get the dispatcher type. Overrides EventInterface:: |
|
TemplatePreprocessDefaultVariablesAlterEvent:: |
public | function | Get the default template variables by reference. | |
TemplatePreprocessDefaultVariablesAlterEvent:: |
public | function | TemplatePreprocessDefaultVariablesAlterEvent constructor. |