public function MigrationDeleteForm::submitForm in Migrate Tools 8
Same name and namespace in other branches
- 8.5 src/Form/MigrationDeleteForm.php \Drupal\migrate_tools\Form\MigrationDeleteForm::submitForm()
- 8.2 src/Form/MigrationDeleteForm.php \Drupal\migrate_tools\Form\MigrationDeleteForm::submitForm()
- 8.3 src/Form/MigrationDeleteForm.php \Drupal\migrate_tools\Form\MigrationDeleteForm::submitForm()
- 8.4 src/Form/MigrationDeleteForm.php \Drupal\migrate_tools\Form\MigrationDeleteForm::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/ MigrationDeleteForm.php, line 63 - Contains Drupal\migrate_tools\Form\MigrationDeleteForm.
Class
- MigrationDeleteForm
- Class MigrationDeleteForm.
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 %label was deleted.', array(
'%label' => $this->entity
->label(),
)));
// Redirect the user to the list controller when complete.
$form_state
->setRedirectUrl($this
->getCancelUrl(), array(
'migration_group' => $this->entity
->get('migration_group'),
));
}