protected function BlockAddForm::prepareBlock in Context 8
Same name and namespace in other branches
- 8.4 src/Reaction/Blocks/Form/BlockAddForm.php \Drupal\context\Reaction\Blocks\Form\BlockAddForm::prepareBlock()
- 8.0 src/Reaction/Blocks/Form/BlockAddForm.php \Drupal\context\Reaction\Blocks\Form\BlockAddForm::prepareBlock()
Prepares the block plugin based on the block ID.
Parameters
string $block_id: Either a block ID, or the plugin ID used to create a new block.
Return value
\Drupal\Core\Block\BlockPluginInterface The block plugin.
Overrides BlockFormBase::prepareBlock
File
- src/
Reaction/ Blocks/ Form/ BlockAddForm.php, line 26
Class
Namespace
Drupal\context\Reaction\Blocks\FormCode
protected function prepareBlock($block_id) {
return $this->blockManager
->createInstance($block_id);
}