interface CategorizingPluginManagerInterface
Same name and namespace in other branches
- 11.x core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php \Drupal\Component\Plugin\CategorizingPluginManagerInterface
- 10 core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php \Drupal\Component\Plugin\CategorizingPluginManagerInterface
- 9 core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php \Drupal\Component\Plugin\CategorizingPluginManagerInterface
- 8.9.x core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php \Drupal\Component\Plugin\CategorizingPluginManagerInterface
Defines an interface for plugin managers that categorize plugin 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 extends \Drupal\Component\Plugin\Discovery\DiscoveryInterface, \Drupal\Component\Plugin\Factory\FactoryInterface, \Drupal\Component\Plugin\Mapper\MapperInterface
- interface \Drupal\Component\Plugin\CategorizingPluginManagerInterface extends \Drupal\Component\Plugin\PluginManagerInterface
- interface \Drupal\Component\Plugin\PluginManagerInterface extends \Drupal\Component\Plugin\Discovery\DiscoveryInterface, \Drupal\Component\Plugin\Factory\FactoryInterface, \Drupal\Component\Plugin\Mapper\MapperInterface
Expanded class hierarchy of CategorizingPluginManagerInterface
All classes that implement CategorizingPluginManagerInterface
7 files declare their use of CategorizingPluginManagerInterface
- ActionManager.php in core/
lib/ Drupal/ Core/ Action/ ActionManager.php - BlockManagerInterface.php in core/
lib/ Drupal/ Core/ Block/ BlockManagerInterface.php - CategorizingPluginManagerTraitTest.php in core/
tests/ Drupal/ Tests/ Core/ Plugin/ CategorizingPluginManagerTraitTest.php - ComponentPluginManager.php in core/
lib/ Drupal/ Core/ Theme/ ComponentPluginManager.php - ConditionManager.php in core/
lib/ Drupal/ Core/ Condition/ ConditionManager.php
File
-
core/
lib/ Drupal/ Component/ Plugin/ CategorizingPluginManagerInterface.php, line 8
Namespace
Drupal\Component\PluginView source
interface CategorizingPluginManagerInterface extends PluginManagerInterface {
/**
* Gets the names of all categories.
*
* @return string[]
* An array of translated categories, sorted alphabetically.
*/
public function getCategories();
/**
* Gets sorted plugin definitions.
*
* @param array[]|null $definitions
* (optional) The plugin definitions to sort. If omitted, all plugin
* definitions are used.
* @param string $label_key
* (optional) The key to be used as a label for sorting.
*
* @return array[]
* An array of plugin definitions, sorted by category and label.
*
* @see https://www.drupal.org/project/drupal/issues/3354672
*/
public function getSortedDefinitions(?array $definitions = NULL, string $label_key = 'label');
/**
* Gets sorted plugin definitions grouped by category.
*
* In addition to grouping, both categories and its entries are sorted,
* whereas plugin definitions are sorted by label.
*
* @param array[]|null $definitions
* (optional) The plugin definitions to group. If omitted, all plugin
* definitions are used.
* @param string $label_key
* (optional) The key to be used as a label for sorting.
*
* @return array[]
* Keys are category names, and values are arrays of which the keys are
* plugin IDs and the values are plugin definitions.
*
* @see https://www.drupal.org/project/drupal/issues/3354672
*/
public function getGroupedDefinitions(?array $definitions = NULL, string $label_key = 'label');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.