You are here

public function BlockStyleManager::getSectionDefinitions in Block Style Plugins 8.2

Gets the definition of all plugins for the Section type.

Return value

mixed[] An array of section plugin definitions (empty array if no definitions were found). Keys are plugin IDs.

File

src/Plugin/BlockStyleManager.php, line 107

Class

BlockStyleManager
Provides the Block style plugin manager.

Namespace

Drupal\block_style_plugins\Plugin

Code

public function getSectionDefinitions() {
  $definitions = $this
    ->getDefinitions();
  $section_definitions = array_filter($definitions, function ($def) {
    return isset($def['type']) && ($def['type'] == 'section' || $def['type'] == 'all');
  });
  return $section_definitions;
}