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()
File
- src/
MultiblockDeleteForm.php, line 31
Class
Namespace
Drupal\multiblockCode
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');
}