public function ContentTypeConfigurationDeleteForm::submitForm in Node Revision Delete 8
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/ ContentTypeConfigurationDeleteForm.php, line 105
Class
- ContentTypeConfigurationDeleteForm
- Provides a content type configuration deletion confirmation form.
Namespace
Drupal\node_revision_delete\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// Deleting the content type configuration.
$this->nodeRevisionDelete
->deleteContentTypeConfig($this->contentType
->id());
// Printing a confirmation message.
$this
->messenger()
->addMessage($this
->t('The Node Revision Delete configuration for the "@content_type" content type has been deleted.', [
'@content_type' => $this->contentType
->label(),
]));
// Redirecting.
$form_state
->setRedirectUrl($this
->getCancelUrl());
}