protected function BlockAddForm::prepareBlock in Context 8.4
Same name and namespace in other branches
- 8 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 27
Class
- BlockAddForm
- Provides a form to add a block in the Block reaction.
Namespace
Drupal\context\Reaction\Blocks\FormCode
protected function prepareBlock($block_id) {
return $this->blockManager
->createInstance($block_id);
}