function BlockManager::getSortedDefinitions

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Block/BlockManager.php \Drupal\Core\Block\BlockManager::getSortedDefinitions()
  2. 10 core/lib/Drupal/Core/Block/BlockManager.php \Drupal\Core\Block\BlockManager::getSortedDefinitions()
  3. 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\Block

Code

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.