public function BlockFormBase::getEntity in Context 8.4
Returns a block entity based on the configured values in context.
Method that can be used by modules depending on hook_form_block_form_alter(). Since that form is an entity form, the getEntity method is available. Since hook_form_block_form_alter is also called in this form, this will break modules depending on this method.
Return value
\Drupal\block\BlockInterface A block entity.
File
- src/
Reaction/ Blocks/ Form/ BlockFormBase.php, line 425
Class
- BlockFormBase
- Provides a Block Form Base for blocks reactions.
Namespace
Drupal\context\Reaction\Blocks\FormCode
public function getEntity() {
return Block::create($this->block
->getConfiguration() + [
'plugin' => $this->block
->getPluginId(),
]);
}