You are here

public function ContextAwarePluginInterface::getContextDefinition in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php \Drupal\Component\Plugin\ContextAwarePluginInterface::getContextDefinition()

Gets a specific context definition of the plugin.

Parameters

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

Return value

\Drupal\Component\Plugin\Context\ContextDefinitionInterface. The definition against which the context value must validate.

Throws

\Drupal\Component\Plugin\Exception\PluginException If the requested context is not defined.

1 method overrides ContextAwarePluginInterface::getContextDefinition()
ContextAwarePluginBase::getContextDefinition in lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
Gets a specific context definition of the plugin.

File

lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php, line 42
Contains \Drupal\Component\Plugin\ContextAwarePluginInterface.

Class

ContextAwarePluginInterface
Interface for defining context aware plugins.

Namespace

Drupal\Component\Plugin

Code

public function getContextDefinition($name);