public function LayoutPluginManager::getGroupedDefinitions in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Layout/LayoutPluginManager.php \Drupal\Core\Layout\LayoutPluginManager::getGroupedDefinitions()
Return value
\Drupal\Core\Layout\LayoutDefinition[][]
Overrides LayoutPluginManagerInterface::getGroupedDefinitions
1 call to LayoutPluginManager::getGroupedDefinitions()
- LayoutPluginManager::getLayoutOptions in core/
lib/ Drupal/ Core/ Layout/ LayoutPluginManager.php - Returns an array of layout labels grouped by category.
File
- core/
lib/ Drupal/ Core/ Layout/ LayoutPluginManager.php, line 218
Class
- LayoutPluginManager
- Provides a plugin manager for layouts.
Namespace
Drupal\Core\LayoutCode
public function getGroupedDefinitions(array $definitions = NULL, $label_key = 'label') {
$definitions = $this
->getSortedDefinitions(isset($definitions) ? $definitions : $this
->getDefinitions(), $label_key);
$grouped_definitions = [];
foreach ($definitions as $id => $definition) {
$grouped_definitions[(string) $definition
->getCategory()][$id] = $definition;
}
return $grouped_definitions;
}