You are here

public function PageEventVariables::remove in Hook Event Dispatcher 8

Remove a given page variable.

Parameters

string $name: Name.

Return value

$this Page

Overrides AbstractEventVariables::remove

File

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

Class

PageEventVariables
Class PageEventVariables.

Namespace

Drupal\hook_event_dispatcher\Event\Preprocess\Variables

Code

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