interface ContextAwarePluginInterface in Drupal 8
Same name in this branch
- 8 core/lib/Drupal/Core/Plugin/ContextAwarePluginInterface.php \Drupal\Core\Plugin\ContextAwarePluginInterface
- 8 core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php \Drupal\Component\Plugin\ContextAwarePluginInterface
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Plugin/ContextAwarePluginInterface.php \Drupal\Core\Plugin\ContextAwarePluginInterface
An override of ContextAwarePluginInterface for documentation purposes.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\Component\Plugin\ContextAwarePluginInterface
- interface \Drupal\Core\Plugin\ContextAwarePluginInterface
- interface \Drupal\Component\Plugin\ContextAwarePluginInterface
Expanded class hierarchy of ContextAwarePluginInterface
All classes that implement ContextAwarePluginInterface
See also
\Drupal\Component\Plugin\ContextAwarePluginInterface
Related topics
13 files declare their use of ContextAwarePluginInterface
- BlockAccessControlHandler.php in core/
modules/ block/ src/ BlockAccessControlHandler.php - BlockForm.php in core/
modules/ block/ src/ BlockForm.php - BlockRepositoryTest.php in core/
modules/ block/ tests/ src/ Unit/ BlockRepositoryTest.php - Contains \Drupal\Tests\block\Unit\BlockRepositoryTest.
- 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 14
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\PluginException
* If the requested context is not defined.
*/
public function getContextDefinition($name);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ContextAwarePluginInterface:: |
public | function | Gets a defined context. | 1 |
ContextAwarePluginInterface:: |
public | function |
Gets a specific context definition of the plugin. Overrides ContextAwarePluginInterface:: |
|
ContextAwarePluginInterface:: |
public | function |
Gets the context definitions of the plugin. Overrides ContextAwarePluginInterface:: |
|
ContextAwarePluginInterface:: |
public | function | Gets a mapping of the expected assignment names to their context names. | 1 |
ContextAwarePluginInterface:: |
public | function | Gets the defined contexts. | 1 |
ContextAwarePluginInterface:: |
public | function | Gets the value for a defined context. | 1 |
ContextAwarePluginInterface:: |
public | function | Gets the values for all defined contexts. | 1 |
ContextAwarePluginInterface:: |
public | function | Set a context on this plugin. | 1 |
ContextAwarePluginInterface:: |
public | function | Sets a mapping of the expected assignment names to their context names. | 1 |
ContextAwarePluginInterface:: |
public | function | Sets the value for a defined context. | 1 |
ContextAwarePluginInterface:: |
public | function | Validates the set values for the defined contexts. | 1 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |