public function ImageEffectDeleteForm::submitForm in Drupal 8
Same name and namespace in other branches
- 9 core/modules/image/src/Form/ImageEffectDeleteForm.php \Drupal\image\Form\ImageEffectDeleteForm::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
- core/
modules/ image/ src/ Form/ ImageEffectDeleteForm.php, line 71
Class
- ImageEffectDeleteForm
- Form for deleting an image effect.
Namespace
Drupal\image\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->imageStyle
->deleteImageEffect($this->imageEffect);
$this
->messenger()
->addStatus($this
->t('The image effect %name has been deleted.', [
'%name' => $this->imageEffect
->label(),
]));
$form_state
->setRedirectUrl($this->imageStyle
->toUrl('edit-form'));
}