public function AbstractEventVariables::set in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x modules/preprocess_event_dispatcher/src/Variables/AbstractEventVariables.php \Drupal\preprocess_event_dispatcher\Variables\AbstractEventVariables::set()
Set a variable to a given value.
Parameters
string $name: Variable name.
mixed $value: Variable value.
1 method overrides AbstractEventVariables::set()
- PageEventVariables::set in modules/
preprocess_event_dispatcher/ src/ Variables/ PageEventVariables.php - Set a given page variable.
File
- modules/
preprocess_event_dispatcher/ src/ Variables/ AbstractEventVariables.php, line 54
Class
- AbstractEventVariables
- Class AbstractEventVariables.
Namespace
Drupal\preprocess_event_dispatcher\VariablesCode
public function set(string $name, $value = NULL) : void {
$this->variables[$name] = $value;
}