protected function ViewsBlockArea::getBlockDefinitions in Views block area 8
Get sorted listed of supported block definitions.
Return value
array An associative array of supported block definitions.
1 call to ViewsBlockArea::getBlockDefinitions()
- ViewsBlockArea::buildOptionsForm in src/
Plugin/ views/ area/ ViewsBlockArea.php - Provide a form to edit options for this plugin.
File
- src/
Plugin/ views/ area/ ViewsBlockArea.php, line 110 - Contains \Drupal\block\Plugin\views\area\Block.
Class
- ViewsBlockArea
- Provides an area handler which renders a block entity in a certain view mode.
Namespace
Drupal\views_block_area\Plugin\views\areaCode
protected function getBlockDefinitions() {
$definitions = $this->blockManager
->getSortedDefinitions();
$block_definitions = [];
foreach ($definitions as $plugin_id => $definition) {
// Context aware plugins are not currently supported.
// Core and component plugins can be context-aware
// https://www.drupal.org/node/1938688
// @see \Drupal\ctools\Plugin\Block\EntityView
if (!empty($definition['context'])) {
continue;
}
$block_definitions[$plugin_id] = $definition;
}
return $block_definitions;
}