public function BlockStyleManager::getBlockDefinitions in Block Style Plugins 8.2
Gets the definition of all plugins for the Block type.
Return value
mixed[] An array of block plugin definitions (empty array if no definitions were found). Keys are plugin IDs.
File
- src/
Plugin/ BlockStyleManager.php, line 92
Class
- BlockStyleManager
- Provides the Block style plugin manager.
Namespace
Drupal\block_style_plugins\PluginCode
public function getBlockDefinitions() {
$definitions = $this
->getDefinitions();
$block_definitions = array_filter($definitions, function ($def) {
return empty($def['type']) || $def['type'] == 'block' || $def['type'] == 'all';
});
return $block_definitions;
}