function BlockContentBlock::blockSubmit
Same name 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()
- 11.x core/modules/block_content/src/Plugin/Block/BlockContentBlock.php \Drupal\block_content\Plugin\Block\BlockContentBlock::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();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.