function CategorizingPluginManagerInterface::getGroupedDefinitions

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php \Drupal\Component\Plugin\CategorizingPluginManagerInterface::getGroupedDefinitions()
  2. 10 core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php \Drupal\Component\Plugin\CategorizingPluginManagerInterface::getGroupedDefinitions()
  3. 9 core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php \Drupal\Component\Plugin\CategorizingPluginManagerInterface::getGroupedDefinitions()
  4. 8.9.x core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php \Drupal\Component\Plugin\CategorizingPluginManagerInterface::getGroupedDefinitions()

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.

Parameters

array[]|null $definitions: (optional) The plugin definitions to group. If omitted, all plugin definitions are used.

string $label_key: (optional) The key to be used as a label for sorting.

Return value

array[] Keys are category names, and values are arrays of which the keys are plugin IDs and the values are plugin definitions.

See also

https://www.drupal.org/project/drupal/issues/3354672

2 methods override CategorizingPluginManagerInterface::getGroupedDefinitions()
FieldTypePluginManager::getGroupedDefinitions in core/lib/Drupal/Core/Field/FieldTypePluginManager.php
Gets sorted field type definitions grouped by category.
LayoutPluginManagerInterface::getGroupedDefinitions in core/lib/Drupal/Core/Layout/LayoutPluginManagerInterface.php

File

core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php, line 52

Class

CategorizingPluginManagerInterface
Defines an interface for plugin managers that categorize plugin definitions.

Namespace

Drupal\Component\Plugin

Code

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.