Skip to content
Snippets Groups Projects

Closes #3520730

2 unresolved threads
Files
7
@@ -15,17 +15,23 @@ interface CategorizingPluginManagerInterface extends PluginManagerInterface {
*/
public function getCategories();
// phpcs:disable Drupal.Commenting
/**
* Gets sorted plugin definitions.
*
* @param array[]|null $definitions
* (optional) The plugin definitions to sort. If omitted, all plugin
* definitions are used.
* @todo Uncomment new method parameter before drupal:12.0.0.
* @see https://www.drupal.org/project/drupal/issues/3354672
* @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.
*/
public function getSortedDefinitions(?array $definitions = NULL);
public function getSortedDefinitions(?array $definitions = NULL /*, string $label_key = 'label' */);
/**
* Gets sorted plugin definitions grouped by category.
@@ -36,11 +42,17 @@ public function getSortedDefinitions(?array $definitions = NULL);
* @param array[]|null $definitions
* (optional) The plugin definitions to group. If omitted, all plugin
* definitions are used.
* @todo Uncomment new method parameter before drupal:12.0.0.
* @see https://www.drupal.org/project/drupal/issues/3354672
* @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.
*/
public function getGroupedDefinitions(?array $definitions = NULL);
public function getGroupedDefinitions(?array $definitions = NULL /*, string $label_key = 'label' */);
// phpcs:enable
}
Loading