function BlockPluginTrait::validateConfigurationForm

Same name in other branches
  1. 9 core/lib/Drupal/Core/Block/BlockPluginTrait.php \Drupal\Core\Block\BlockPluginTrait::validateConfigurationForm()
  2. 8.9.x core/lib/Drupal/Core/Block/BlockPluginTrait.php \Drupal\Core\Block\BlockPluginTrait::validateConfigurationForm()
  3. 11.x core/lib/Drupal/Core/Block/BlockPluginTrait.php \Drupal\Core\Block\BlockPluginTrait::validateConfigurationForm()

Most block plugins should not override this method. To add validation for a specific block type, override BlockBase::blockValidate().

See also

\Drupal\Core\Block\BlockBase::blockValidate()

1 call to BlockPluginTrait::validateConfigurationForm()
ValidationErrorBlock::validateConfigurationForm in core/modules/settings_tray/tests/modules/settings_tray_test/src/Plugin/Block/ValidationErrorBlock.php
Most block plugins should not override this method. To add validation for a specific block type, override BlockBase::blockValidate().
1 method overrides BlockPluginTrait::validateConfigurationForm()
ValidationErrorBlock::validateConfigurationForm in core/modules/settings_tray/tests/modules/settings_tray_test/src/Plugin/Block/ValidationErrorBlock.php
Most block plugins should not override this method. To add validation for a specific block type, override BlockBase::blockValidate().

File

core/lib/Drupal/Core/Block/BlockPluginTrait.php, line 207

Class

BlockPluginTrait
Provides the base implementation of a block plugin.

Namespace

Drupal\Core\Block

Code

public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
    // Remove the admin_label form item element value so it will not persist.
    $form_state->unsetValue('admin_label');
    $this->blockValidate($form, $form_state);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.