Updated Drupal to 8.6. This goes with the following updates because it's possible...
[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  * @internal
11  */
12 class FilterFormatAddForm extends FilterFormatFormBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   public function form(array $form, FormStateInterface $form_state) {
18     return parent::form($form, $form_state);
19   }
20
21   /**
22    * {@inheritdoc}
23    */
24   public function submitForm(array &$form, FormStateInterface $form_state) {
25     parent::submitForm($form, $form_state);
26     $this->messenger()->addStatus($this->t('Added text format %format.', ['%format' => $this->entity->label()]));
27     return $this->entity;
28   }
29
30 }