public function BlockPluginTrait::validateConfigurationForm in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Block/BlockPluginTrait.php \Drupal\Core\Block\BlockPluginTrait::validateConfigurationForm()
- 9 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 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\BlockCode
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);
}