Version 1
[yaffs-website] / web / core / modules / filter / src / FilterFormatAddForm.php
1 <?php
2
3 namespace Drupal\filter;
4
5 use Drupal\Core\Form\FormStateInterface;
6
7 /**
8  * Provides a form for adding a filter format.
9  */
10 class FilterFormatAddForm extends FilterFormatFormBase {
11
12   /**
13    * {@inheritdoc}
14    */
15   public function form(array $form, FormStateInterface $form_state) {
16     return parent::form($form, $form_state);
17   }
18
19   /**
20    * {@inheritdoc}
21    */
22   public function submitForm(array &$form, FormStateInterface $form_state) {
23     parent::submitForm($form, $form_state);
24     drupal_set_message($this->t('Added text format %format.', ['%format' => $this->entity->label()]));
25     return $this->entity;
26   }
27
28 }