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