public function PageVariant::setStaticContext in Page Manager 8
Same name and namespace in other branches
- 8.4 src/Entity/PageVariant.php \Drupal\page_manager\Entity\PageVariant::setStaticContext()
Adds/updates a given static context.
Parameters
string $name: The static context unique machine name.
array $configuration: A new array of configuration for the static context.
Return value
$this
Overrides PageVariantInterface::setStaticContext
File
- src/
Entity/ PageVariant.php, line 382 - Contains Drupal\page_manager\Entity\PageVariant.
Class
- PageVariant
- Defines the page variant entity.
Namespace
Drupal\page_manager\EntityCode
public function setStaticContext($name, $configuration) {
$this->static_context[$name] = $configuration;
$this
->resetCollectedContexts();
return $this;
}