public BlockBase::submitConfigurationForm(array &$form, FormStateInterface $form_state)
Most block plugins should not override this method. To add submission handling for a specific block type, override BlockBase::blockSubmit().
Overrides PluginFormInterface::submitConfigurationForm
\Drupal\Core\Block\BlockBase::blockSubmit()
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); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Block!BlockBase.php/function/BlockBase::submitConfigurationForm/8.1.x