Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BlockContentBlock.php

function BlockContentBlock::blockSubmit

Overrides BlockPluginTrait::blockSubmit

File

core/modules/block_content/src/Plugin/Block/BlockContentBlock.php, line 168

Class

BlockContentBlock
Defines a generic block type.

Namespace

Drupal\block_content\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
    // Invalidate the block cache to update content block-based derivatives.
    $this->configuration['view_mode'] = $form_state->getValue('view_mode');
    $this->blockManager
        ->clearCachedDefinitions();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal