public function BlockBase::submit

Implements \Drupal\block\BlockPluginInterface::submit().

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

@todo Add inline documentation to this method.

Overrides BlockPluginInterface::submit

See also

\Drupal\block\BlockBase::blockSubmit()

File

drupal/core/modules/block/lib/Drupal/block/BlockBase.php, line 201
Contains \Drupal\block\BlockBase.

Class

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

Namespace

Drupal\block

Code

public function submit($form, &$form_state) {
  if (!form_get_errors()) {
    $this->configuration['label'] = $form_state['values']['label'];
    $this->configuration['label_display'] = $form_state['values']['label_display'];
    $this->configuration['module'] = $form_state['values']['module'];
    $this
      ->blockSubmit($form, $form_state);
  }
}