function LayoutPluginManager::getCategories
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Layout/LayoutPluginManager.php \Drupal\Core\Layout\LayoutPluginManager::getCategories()
- 10 core/lib/Drupal/Core/Layout/LayoutPluginManager.php \Drupal\Core\Layout\LayoutPluginManager::getCategories()
- 11.x core/lib/Drupal/Core/Layout/LayoutPluginManager.php \Drupal\Core\Layout\LayoutPluginManager::getCategories()
Overrides CategorizingPluginManagerInterface::getCategories
File
-
core/
lib/ Drupal/ Core/ Layout/ LayoutPluginManager.php, line 185
Class
- LayoutPluginManager
- Provides a plugin manager for layouts.
Namespace
Drupal\Core\LayoutCode
public function getCategories() {
// Fetch all categories from definitions and remove duplicates.
$categories = array_unique(array_values(array_map(function (LayoutDefinition $definition) {
return $definition->getCategory();
}, $this->getDefinitions())));
natcasesort($categories);
return $categories;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.