interface FilteredPluginManagerInterface in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Plugin/FilteredPluginManagerInterface.php \Drupal\Core\Plugin\FilteredPluginManagerInterface
- 10 core/lib/Drupal/Core/Plugin/FilteredPluginManagerInterface.php \Drupal\Core\Plugin\FilteredPluginManagerInterface
Provides an interface for plugin managers that allow filtering definitions.
Hierarchy
- interface \Drupal\Component\Plugin\Discovery\DiscoveryInterface; interface \Drupal\Component\Plugin\Factory\FactoryInterface; interface \Drupal\Component\Plugin\Mapper\MapperInterface
- interface \Drupal\Component\Plugin\PluginManagerInterface
- interface \Drupal\Core\Plugin\FilteredPluginManagerInterface
- interface \Drupal\Component\Plugin\PluginManagerInterface
Expanded class hierarchy of FilteredPluginManagerInterface
All classes that implement FilteredPluginManagerInterface
4 files declare their use of FilteredPluginManagerInterface
- BlockManagerInterface.php in core/
lib/ Drupal/ Core/ Block/ BlockManagerInterface.php - ConditionManager.php in core/
lib/ Drupal/ Core/ Condition/ ConditionManager.php - FilteredPluginManagerTraitTest.php in core/
tests/ Drupal/ Tests/ Core/ Plugin/ FilteredPluginManagerTraitTest.php - LayoutPluginManagerInterface.php in core/
lib/ Drupal/ Core/ Layout/ LayoutPluginManagerInterface.php
File
- core/
lib/ Drupal/ Core/ Plugin/ FilteredPluginManagerInterface.php, line 10
Namespace
Drupal\Core\PluginView source
interface FilteredPluginManagerInterface extends PluginManagerInterface {
/**
* Gets the plugin definitions for a given type and consumer and filters them.
*
* This allows modules and themes to alter plugin definitions at runtime,
* which is useful for tasks like hiding specific plugins from a particular
* user interface.
*
* @param string $consumer
* A string identifying the consumer of these plugin definitions.
* @param \Drupal\Component\Plugin\Context\ContextInterface[]|null $contexts
* (optional) Either an array of contexts to use for filtering, or NULL to
* not filter by contexts.
* @param mixed[] $extra
* (optional) An associative array containing additional information
* provided by the code requesting the filtered definitions.
*
* @return \Drupal\Component\Plugin\Definition\PluginDefinitionInterface[]|array[]
* An array of plugin definitions that are filtered.
*
* @see hook_plugin_filter_TYPE_alter()
* @see hook_plugin_filter_TYPE__CONSUMER_alter()
*/
public function getFilteredDefinitions($consumer, $contexts = NULL, array $extra = []);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DiscoveryInterface:: |
public | function | Gets a specific plugin definition. | 4 |
DiscoveryInterface:: |
public | function | Gets the definition of all plugins for this type. | 3 |
DiscoveryInterface:: |
public | function | Indicates if a specific plugin definition exists. | 1 |
FactoryInterface:: |
public | function | Creates a pre-configured instance of a plugin. | 6 |
FilteredPluginManagerInterface:: |
public | function | Gets the plugin definitions for a given type and consumer and filters them. | |
MapperInterface:: |
public | function | Gets a preconfigured instance of a plugin. | 3 |