You are here

public function ContextAwarePluginInterface::getContext in Plug 7

Gets a defined context.

Parameters

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

Return value

\Drupal\Component\Plugin\Context\ContextInterface The context object.

Throws

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

1 method overrides ContextAwarePluginInterface::getContext()
ContextAwarePluginBase::getContext in lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
Gets a defined context.

File

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

Class

ContextAwarePluginInterface
Interface for defining context aware plugins.

Namespace

Drupal\Component\Plugin

Code

public function getContext($name);