You are here

public function AbstractEventVariables::remove in Hook Event Dispatcher 8

Remove a given variable.

Parameters

string $name: Variable name.

Return value

$this Event variables.

1 method overrides AbstractEventVariables::remove()
PageEventVariables::remove in src/Event/Preprocess/Variables/PageEventVariables.php
Remove a given page variable.

File

src/Event/Preprocess/Variables/AbstractEventVariables.php, line 69

Class

AbstractEventVariables
Class AbstractEventVariables.

Namespace

Drupal\hook_event_dispatcher\Event\Preprocess\Variables

Code

public function remove($name) {
  unset($this->variables[$name]);
  return $this;
}