You are here

public function Page::addContext in Page Manager 8.4

Same name and namespace in other branches
  1. 8 src/Entity/Page.php \Drupal\page_manager\Entity\Page::addContext()

Sets the context for a given name.

Parameters

string $name: The name of the context.

\Drupal\Component\Plugin\Context\ContextInterface $value: The context to add.

Return value

$this

Overrides PageInterface::addContext

File

src/Entity/Page.php, line 333

Class

Page
Defines a Page entity class.

Namespace

Drupal\page_manager\Entity

Code

public function addContext($name, ContextInterface $value) {
  $this->contexts[$name] = $value;
  return $this;
}