public function MigrationGroupDeleteForm::submitForm in Migrate Tools 8
Same name and namespace in other branches
- 8.5 src/Form/MigrationGroupDeleteForm.php \Drupal\migrate_tools\Form\MigrationGroupDeleteForm::submitForm()
- 8.2 src/Form/MigrationGroupDeleteForm.php \Drupal\migrate_tools\Form\MigrationGroupDeleteForm::submitForm()
- 8.3 src/Form/MigrationGroupDeleteForm.php \Drupal\migrate_tools\Form\MigrationGroupDeleteForm::submitForm()
- 8.4 src/Form/MigrationGroupDeleteForm.php \Drupal\migrate_tools\Form\MigrationGroupDeleteForm::submitForm()
The submit handler for the confirm form.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: An associative array containing the current state of the form.
Overrides EntityForm::submitForm
File
- src/
Form/ MigrationGroupDeleteForm.php, line 63 - Contains Drupal\migrate_tools\Form\MigrationGroupDeleteForm.
Class
- MigrationGroupDeleteForm
- Class MigrationGroupDeleteForm.
Namespace
Drupal\migrate_tools\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// Delete the entity.
$this->entity
->delete();
// Set a message that the entity was deleted.
drupal_set_message(t('Migration group %label was deleted.', array(
'%label' => $this->entity
->label(),
)));
// Redirect the user to the list controller when complete.
$form_state
->setRedirectUrl($this
->getCancelUrl());
}