interface ContextAwarePluginInterface
Same name in this branch
- 10 core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php \Drupal\Component\Plugin\ContextAwarePluginInterface
Same name in other branches
- 9 core/lib/Drupal/Core/Plugin/ContextAwarePluginInterface.php \Drupal\Core\Plugin\ContextAwarePluginInterface
- 9 core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php \Drupal\Component\Plugin\ContextAwarePluginInterface
- 8.9.x core/lib/Drupal/Core/Plugin/ContextAwarePluginInterface.php \Drupal\Core\Plugin\ContextAwarePluginInterface
- 8.9.x core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php \Drupal\Component\Plugin\ContextAwarePluginInterface
- 11.x core/lib/Drupal/Core/Plugin/ContextAwarePluginInterface.php \Drupal\Core\Plugin\ContextAwarePluginInterface
- 11.x core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php \Drupal\Component\Plugin\ContextAwarePluginInterface
An override of ContextAwarePluginInterface for documentation purposes.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\Component\Plugin\ContextAwarePluginInterface extends \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\Core\Plugin\ContextAwarePluginInterface extends \Drupal\Component\Plugin\ContextAwarePluginInterface
- interface \Drupal\Component\Plugin\ContextAwarePluginInterface extends \Drupal\Component\Plugin\PluginInspectionInterface
Expanded class hierarchy of ContextAwarePluginInterface
All classes that implement ContextAwarePluginInterface
See also
\Drupal\Component\Plugin\ContextAwarePluginInterface
\Drupal\Core\Plugin\ContextAwarePluginTrait
Related topics
21 files declare their use of ContextAwarePluginInterface
- BlockAccessControlHandler.php in core/
modules/ block/ src/ BlockAccessControlHandler.php - BlockBase.php in core/
lib/ Drupal/ Core/ Block/ BlockBase.php - BlockForm.php in core/
modules/ block/ src/ BlockForm.php - BlockViewBuilder.php in core/
modules/ block/ src/ BlockViewBuilder.php - ConfigureBlockFormBase.php in core/
modules/ layout_builder/ src/ Form/ ConfigureBlockFormBase.php
File
-
core/
lib/ Drupal/ Core/ Plugin/ ContextAwarePluginInterface.php, line 15
Namespace
Drupal\Core\PluginView source
interface ContextAwarePluginInterface extends ComponentContextAwarePluginInterface {
/**
* Gets the context definitions of the plugin.
*
* @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface[]
* The array of context definitions, keyed by context name.
*/
public function getContextDefinitions();
/**
* Gets a specific context definition of the plugin.
*
* @param string $name
* The name of the context in the plugin definition.
*
* @return \Drupal\Core\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.
*/
public function getContextDefinition($name);
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
ContextAwarePluginInterface::getContext | public | function | Gets a defined context. | ||
ContextAwarePluginInterface::getContextDefinition | public | function | Gets a specific context definition of the plugin. | Overrides ContextAwarePluginInterface::getContextDefinition | |
ContextAwarePluginInterface::getContextDefinitions | public | function | Gets the context definitions of the plugin. | Overrides ContextAwarePluginInterface::getContextDefinitions | |
ContextAwarePluginInterface::getContextMapping | public | function | Gets a mapping of the expected assignment names to their context names. | ||
ContextAwarePluginInterface::getContexts | public | function | Gets the defined contexts. | ||
ContextAwarePluginInterface::getContextValue | public | function | Gets the value for a defined context. | ||
ContextAwarePluginInterface::getContextValues | public | function | Gets the values for all defined contexts. | ||
ContextAwarePluginInterface::setContext | public | function | Set a context on this plugin. | 1 | |
ContextAwarePluginInterface::setContextMapping | public | function | Sets a mapping of the expected assignment names to their context names. | ||
ContextAwarePluginInterface::setContextValue | public | function | Sets the value for a defined context. | ||
ContextAwarePluginInterface::validateContexts | public | function | Validates the set values for the defined contexts. | ||
PluginInspectionInterface::getPluginDefinition | public | function | Gets the definition of the plugin implementation. | 6 | |
PluginInspectionInterface::getPluginId | public | function | Gets the plugin ID of the plugin instance. | 2 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.