You are here

public function BlockBase::validateConfigurationForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Block/BlockBase.php \Drupal\Core\Block\BlockBase::validateConfigurationForm()

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

Overrides PluginFormInterface::validateConfigurationForm

See also

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

File

core/lib/Drupal/Core/Block/BlockBase.php, line 204
Contains \Drupal\Core\Block\BlockBase.

Class

BlockBase
Defines a base block implementation that most blocks plugins will extend.

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);
}