final class TemplatePreprocessDefaultVariablesAlterEvent in Hook Event Dispatcher 8
Class TemplatePreprocessDefaultVariablesAlterEvent.
Hierarchy
- class \Drupal\hook_event_dispatcher\Event\Theme\TemplatePreprocessDefaultVariablesAlterEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of TemplatePreprocessDefaultVariablesAlterEvent
2 files declare their use of TemplatePreprocessDefaultVariablesAlterEvent
- hook_event_dispatcher.module in ./
hook_event_dispatcher.module - Hook event dispatcher module.
- TemplatePreprocessDefaultVariablesAlterEventTest.php in tests/
src/ Unit/ Theme/ TemplatePreprocessDefaultVariablesAlterEventTest.php
File
- src/
Event/ Theme/ TemplatePreprocessDefaultVariablesAlterEvent.php, line 12
Namespace
Drupal\hook_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() {
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() {
return $this->variables;
}
/**
* Set the updated default template variables.
*
* @param array $variables
* The updated associative array of default template variables.
*/
public function setVariables(array $variables) {
$this->variables = $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 | Set the updated default template variables. | |
TemplatePreprocessDefaultVariablesAlterEvent:: |
public | function | TemplatePreprocessDefaultVariablesAlterEvent constructor. |