function FilterFormatAddForm::submitForm

Same name in other branches
  1. 8.9.x core/modules/filter/src/FilterFormatAddForm.php \Drupal\filter\FilterFormatAddForm::submitForm()
  2. 10 core/modules/filter/src/FilterFormatAddForm.php \Drupal\filter\FilterFormatAddForm::submitForm()
  3. 11.x core/modules/filter/src/FilterFormatAddForm.php \Drupal\filter\FilterFormatAddForm::submitForm()

Overrides FilterFormatFormBase::submitForm

File

core/modules/filter/src/FilterFormatAddForm.php, line 24

Class

FilterFormatAddForm
Provides a form for adding a filter format.

Namespace

Drupal\filter

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
    parent::submitForm($form, $form_state);
    $this->messenger()
        ->addStatus($this->t('Added text format %format.', [
        '%format' => $this->entity
            ->label(),
    ]));
    $form_state->setRedirect('filter.admin_overview');
    return $this->entity;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.