public function BlockFieldManager::getBlockDefinitions in Block field 8
Get sorted listed of supported block definitions.
Return value
array An associative array of supported block definitions.
Overrides BlockFieldManagerInterface::getBlockDefinitions
File
- src/
BlockFieldManager.php, line 43
Class
- BlockFieldManager
- Defines a service that manages block plugins for the block field.
Namespace
Drupal\block_fieldCode
public function getBlockDefinitions() {
$definitions = $this->blockManager
->getDefinitionsForContexts($this->contextRepository
->getAvailableContexts());
return $this->blockManager
->getSortedDefinitions($definitions);
}