public function BlockPluginTrait::submitConfigurationForm in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Block/BlockPluginTrait.php \Drupal\Core\Block\BlockPluginTrait::submitConfigurationForm()
- 9 core/lib/Drupal/Core/Block/BlockPluginTrait.php \Drupal\Core\Block\BlockPluginTrait::submitConfigurationForm()
Most block plugins should not override this method. To add submission handling for a specific block type, override BlockBase::blockSubmit().
See also
\Drupal\Core\Block\BlockBase::blockSubmit()
File
- core/
lib/ Drupal/ Core/ Block/ BlockPluginTrait.php, line 228
Class
- BlockPluginTrait
- Provides the base implementation of a block plugin.
Namespace
Drupal\Core\BlockCode
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
// Process the block's submission handling if no errors occurred only.
if (!$form_state
->getErrors()) {
$this->configuration['label'] = $form_state
->getValue('label');
$this->configuration['label_display'] = $form_state
->getValue('label_display');
$this->configuration['provider'] = $form_state
->getValue('provider');
$this
->blockSubmit($form, $form_state);
}
}