Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ContextAwarePluginInterface.php

function ContextAwarePluginInterface::getContextDefinition

Same name in this branch
  1. 11.1.x core/lib/Drupal/Core/Plugin/ContextAwarePluginInterface.php \Drupal\Core\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\ContextException If the requested context is not defined.

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

File

core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php, line 37

Class

ContextAwarePluginInterface
Interface for defining context aware plugins.

Namespace

Drupal\Component\Plugin

Code

public function getContextDefinition($name);
RSS feed
Powered by Drupal