function ContextAwarePluginInterface::getContextValue

Same name in other branches
  1. 9 core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php \Drupal\Component\Plugin\ContextAwarePluginInterface::getContextValue()
  2. 10 core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php \Drupal\Component\Plugin\ContextAwarePluginInterface::getContextValue()
  3. 11.x core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php \Drupal\Component\Plugin\ContextAwarePluginInterface::getContextValue()

Gets the value for a defined context.

Parameters

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

Return value

mixed The currently set context value.

Throws

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

3 calls to ContextAwarePluginInterface::getContextValue()
ExtraFieldBlock::getEntity in core/modules/layout_builder/src/Plugin/Block/ExtraFieldBlock.php
Gets the entity that has the field.
FieldBlock::build in core/modules/layout_builder/src/Plugin/Block/FieldBlock.php
FieldBlock::getEntity in core/modules/layout_builder/src/Plugin/Block/FieldBlock.php
Gets the entity that has the field.
1 method overrides ContextAwarePluginInterface::getContextValue()
ContextAwarePluginBase::getContextValue in core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
Gets the value for a defined context.

File

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

Class

ContextAwarePluginInterface
Interface for defining context aware plugins.

Namespace

Drupal\Component\Plugin

Code

public function getContextValue($name);

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