function ContextAwarePluginDefinitionInterface::getContextDefinition

Same name in other branches
  1. 9 core/lib/Drupal/Component/Plugin/Definition/ContextAwarePluginDefinitionInterface.php \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::getContextDefinition()
  2. 8.9.x core/lib/Drupal/Component/Plugin/Definition/ContextAwarePluginDefinitionInterface.php \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::getContextDefinition()
  3. 10 core/lib/Drupal/Component/Plugin/Definition/ContextAwarePluginDefinitionInterface.php \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::getContextDefinition()

Returns a particular context definition for this plugin.

Parameters

string $name: The context name.

Return value

\Drupal\Component\Plugin\Context\ContextDefinitionInterface The context definition.

Throws

\Drupal\Component\Plugin\Exception\ContextException Thrown if the plugin does not define the given context.

File

core/lib/Drupal/Component/Plugin/Definition/ContextAwarePluginDefinitionInterface.php, line 45

Class

ContextAwarePluginDefinitionInterface
Provides an interface for plugin definitions which use contexts.

Namespace

Drupal\Component\Plugin\Definition

Code

public function getContextDefinition($name);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.