public function MultiblockDeleteForm::submitForm in MultiBlock 8
Same name in this branch
- 8 src/MultiblockDeleteForm.php \Drupal\multiblock\MultiblockDeleteForm::submitForm()
- 8 src/Form/MultiblockDeleteForm.php \Drupal\multiblock\Form\MultiblockDeleteForm::submitForm()
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- src/
Form/ MultiblockDeleteForm.php, line 36
Class
Namespace
Drupal\multiblock\FormCode
public function submitForm(array &$form, \Drupal\Core\Form\FormStateInterface $form_state) {
if (multiblock_delete($form_state
->getValue([
'delta',
]))) {
drupal_set_message(t('Block successfully deleted!'));
}
else {
drupal_set_message(t('There was a problem deleting the block'));
}
$form_state
->set([
'redirect',
], 'admin/structure/block/instances');
}