public function CustomBlockBlock::blockSubmit

Overrides \Drupal\block\BlockBase::blockSubmit().

Overrides BlockBase::blockSubmit

File

drupal/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php, line 62
Contains \Drupal\custom_block\Plugin\Block\CustomBlockBlock.

Class

CustomBlockBlock
Defines a generic custom block type.

Namespace

Drupal\custom_block\Plugin\Block

Code

public function blockSubmit($form, &$form_state) {

  // Invalidate the block cache to update custom block-based derivatives.
  if (module_exists('block')) {
    drupal_container()
      ->get('plugin.manager.block')
      ->clearCachedDefinitions();
  }
}