function BlockManager::getSortedDefinitions
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Block/BlockManager.php \Drupal\Core\Block\BlockManager::getSortedDefinitions()
- 10 core/lib/Drupal/Core/Block/BlockManager.php \Drupal\Core\Block\BlockManager::getSortedDefinitions()
- 11.x core/lib/Drupal/Core/Block/BlockManager.php \Drupal\Core\Block\BlockManager::getSortedDefinitions()
File
-
core/
lib/ Drupal/ Core/ Block/ BlockManager.php, line 73
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 admin label.
$definitions = $this->traitGetSortedDefinitions($definitions, 'admin_label');
// Do not display the 'broken' plugin in the UI.
unset($definitions['broken']);
return $definitions;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.