You are here

public function PageEventVariables::set in Hook Event Dispatcher 8

Set a given page variable.

Parameters

string $name: Name.

mixed $value: Value.

Return value

$this PageEventVariables

Overrides AbstractEventVariables::set

File

src/Event/Preprocess/Variables/PageEventVariables.php, line 66

Class

PageEventVariables
Class PageEventVariables.

Namespace

Drupal\hook_event_dispatcher\Event\Preprocess\Variables

Code

public function set($name, $value = NULL) {
  $this->variables['page'][$name] = $value;
  return $this;
}