FilterFormatAddForm.php 643 Bytes
Newer Older
1 2 3 4
<?php

namespace Drupal\filter;

5 6
use Drupal\Core\Form\FormStateInterface;

7
/**
8
 * Provides a form for adding a filter format.
9 10
 *
 * @internal
11
 */
12
class FilterFormatAddForm extends FilterFormatFormBase {
13 14 15 16

  /**
   * {@inheritdoc}
   */
17
  public function form(array $form, FormStateInterface $form_state) {
18 19 20 21 22 23
    return parent::form($form, $form_state);
  }

  /**
   * {@inheritdoc}
   */
24 25
  public function submitForm(array &$form, FormStateInterface $form_state) {
    parent::submitForm($form, $form_state);
26
    drupal_set_message($this->t('Added text format %format.', ['%format' => $this->entity->label()]));
27 28 29 30
    return $this->entity;
  }

}