function CategorizingPluginManagerTrait::getGroupedDefinitions
File
- 
              core/lib/ Drupal/ Core/ Plugin/ CategorizingPluginManagerTrait.php, line 105 
Class
- CategorizingPluginManagerTrait
- Provides a trait for the CategorizingPluginManagerInterface.
Namespace
Drupal\Core\PluginCode
public function getGroupedDefinitions(array $definitions = NULL, $label_key = 'label') {
  /** @var \Drupal\Core\Plugin\CategorizingPluginManagerTrait|\Drupal\Component\Plugin\PluginManagerInterface $this */
  $definitions = $this->getSortedDefinitions(isset($definitions) ? $definitions : $this->getDefinitions(), $label_key);
  $grouped_definitions = [];
  foreach ($definitions as $id => $definition) {
    $grouped_definitions[(string) $definition['category']][$id] = $definition;
  }
  return $grouped_definitions;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
