Skip to content
FilterFormatAddForm.php 710 B
Newer Older
 * Provides a form for adding a filter format.
class FilterFormatAddForm extends FilterFormatFormBase {
  public function form(array $form, FormStateInterface $form_state) {
    return parent::form($form, $form_state);
  }

  /**
   * {@inheritdoc}
   */
  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');