public function AdminBlockDeleteForm::submitForm

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

array $form_state: An associative array containing the current state of the form.

Overrides FormInterface::submitForm

File

drupal/core/modules/block/lib/Drupal/block/Form/AdminBlockDeleteForm.php, line 67
Contains \Drupal\block\Form\AdminBlockDeleteForm.

Class

AdminBlockDeleteForm
Provides a deletion confirmation form for the block instance deletion form.

Namespace

Drupal\block\Form

Code

public function submitForm(array &$form, array &$form_state) {
  $this->block
    ->delete();
  drupal_set_message(t('The block %name has been removed.', array(
    '%name' => $this->block
      ->label(),
  )));
  $form_state['redirect'] = 'admin/structure/block';
}