public function BlockContentBlock::blockSubmit in Drupal 8
Same name and namespace in other branches
- 9 core/modules/block_content/src/Plugin/Block/BlockContentBlock.php \Drupal\block_content\Plugin\Block\BlockContentBlock::blockSubmit()
- 10 core/modules/block_content/src/Plugin/Block/BlockContentBlock.php \Drupal\block_content\Plugin\Block\BlockContentBlock::blockSubmit()
Overrides BlockPluginTrait::blockSubmit
File
- core/
modules/ block_content/ src/ Plugin/ Block/ BlockContentBlock.php, line 166
Class
- BlockContentBlock
- Defines a generic custom block type.
Namespace
Drupal\block_content\Plugin\BlockCode
public function blockSubmit($form, FormStateInterface $form_state) {
// Invalidate the block cache to update custom block-based derivatives.
$this->configuration['view_mode'] = $form_state
->getValue('view_mode');
$this->blockManager
->clearCachedDefinitions();
}