BlockBase::validateConfigurationForm

public BlockBase::validateConfigurationForm(array &$form, FormStateInterface $form_state)

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 202

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);
}
doc_Drupal
2016-10-29 08:46:37
Comments
Leave a Comment

Please login to continue.