You are here

public function PageEventVariables::getByReference in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/preprocess_event_dispatcher/src/Variables/PageEventVariables.php \Drupal\preprocess_event_dispatcher\Variables\PageEventVariables::getByReference()

Get a variable with a given name by reference.

Parameters

string $name: Variable name.

Return value

mixed Reference for the variable.

Overrides AbstractEventVariables::getByReference

File

modules/preprocess_event_dispatcher/src/Variables/PageEventVariables.php, line 86

Class

PageEventVariables
Class PageEventVariables.

Namespace

Drupal\preprocess_event_dispatcher\Variables

Code

public function &getByReference(string $name) {
  return $this->variables['page'][$name];
}