public function PageEventVariables::get in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x modules/preprocess_event_dispatcher/src/Variables/PageEventVariables.php \Drupal\preprocess_event_dispatcher\Variables\PageEventVariables::get()
Get the template var.
Parameters
string $name: Name.
mixed $default: Default.
Return value
mixed Value
Overrides AbstractEventVariables::get
File
- modules/
preprocess_event_dispatcher/ src/ Variables/ PageEventVariables.php, line 47
Class
- PageEventVariables
- Class PageEventVariables.
Namespace
Drupal\preprocess_event_dispatcher\VariablesCode
public function get(string $name, $default = NULL) {
if (!isset($this->variables['page'][$name])) {
return $default;
}
return $this->variables['page'][$name];
}