public function BlockManager::getGroupedDefinitions
public BlockManager::getGroupedDefinitions(array $definitions = NULL)
Gets sorted plugin definitions grouped by category.
In addition to grouping, both categories and its entries are sorted, whereas plugin definitions are sorted by label.
Parameters
array[]|null $definitions: (optional) The plugin definitions to group. If omitted, all plugin definitions are used.
Return value
array[] Keys are category names, and values are arrays of which the keys are plugin IDs and the values are plugin definitions.
Overrides CategorizingPluginManagerInterface::getGroupedDefinitions
File
- core/lib/Drupal/Core/Block/BlockManager.php, line 67
Class
- BlockManager
- Manages discovery and instantiation of block plugins.
Namespace
Drupal\Core\BlockCode
public function getGroupedDefinitions(array $definitions = NULL) { $definitions = $this->traitGetGroupedDefinitions($definitions, 'admin_label'); // Do not display the 'broken' plugin in the UI. unset($definitions[$this->t('Block')]['broken']); return $definitions; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Block!BlockManager.php/function/BlockManager::getGroupedDefinitions/8.1.x