You are here

public function PageVariant::removeStaticContext in Page Manager 8

Same name and namespace in other branches
  1. 8.4 src/Entity/PageVariant.php \Drupal\page_manager\Entity\PageVariant::removeStaticContext()

Removes a specific static context.

Parameters

string $name: The static context unique name.

Return value

$this

Overrides PageVariantInterface::removeStaticContext

File

src/Entity/PageVariant.php, line 391
Contains Drupal\page_manager\Entity\PageVariant.

Class

PageVariant
Defines the page variant entity.

Namespace

Drupal\page_manager\Entity

Code

public function removeStaticContext($name) {
  unset($this->static_context[$name]);
  $this
    ->resetCollectedContexts();
  return $this;
}