public function BlockManager::getSortedDefinitions in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Block/BlockManager.php \Drupal\Core\Block\BlockManager::getSortedDefinitions()
Gets sorted plugin definitions.
Parameters
array[]|null $definitions: (optional) The plugin definitions to sort. If omitted, all plugin definitions are used.
Return value
array[] An array of plugin definitions, sorted by category and label.
Overrides CategorizingPluginManagerInterface::getSortedDefinitions
File
- core/
lib/ Drupal/ Core/ Block/ BlockManager.php, line 61 - Contains \Drupal\Core\Block\BlockManager.
Class
- BlockManager
- Manages discovery and instantiation of block plugins.
Namespace
Drupal\Core\BlockCode
public function getSortedDefinitions(array $definitions = NULL) {
// Sort the plugins first by category, then by label.
$definitions = $this
->traitGetSortedDefinitions($definitions, 'admin_label');
// Do not display the 'broken' plugin in the UI.
unset($definitions['broken']);
return $definitions;
}