public function ContextInterface::setContextDefinition

Sets the definition that the context must conform to.

Parameters

array $contextDefinition: A defining characteristic representation of the context against which that context can be validated. This is typically an array having a class name set under the 'class' key, but it could be extended to support other notations.

1 method overrides ContextInterface::setContextDefinition()

File

drupal/core/lib/Drupal/Component/Plugin/Context/ContextInterface.php, line 42
Contains \Drupal\Component\Plugin\Context\ContextInterface.

Class

ContextInterface
A generic context interface for wrapping data a plugin needs to operate.

Namespace

Drupal\Component\Plugin\Context

Code

public function setContextDefinition(array $contextDefinition);