You are here

public function PluginContextDefinitionInterface::getContextDefinition in Plugin 8.2

Gets a specific context definition.

Parameters

string $name: The name of the context in the plugin definition.

Return value

\Drupal\Component\Plugin\Context\ContextDefinitionInterface

Throws

\InvalidArgumentException If the requested context does not exist.

See also

self::hasContextDefinition()

1 method overrides PluginContextDefinitionInterface::getContextDefinition()
ArrayPluginDefinitionDecorator::getContextDefinition in src/PluginDefinition/ArrayPluginDefinitionDecorator.php
Gets a specific context definition.

File

src/PluginDefinition/PluginContextDefinitionInterface.php, line 60

Class

PluginContextDefinitionInterface
Defines a plugin definition that includes contexts.

Namespace

Drupal\plugin\PluginDefinition

Code

public function getContextDefinition($name);