a1b3d9588ddc0549b3de3e60fc1b658eec0c82c3
[yaffs-website] / web / core / modules / image / src / Form / ImageStyleAddForm.php
1 <?php
2
3 namespace Drupal\image\Form;
4
5 use Drupal\Core\Form\FormStateInterface;
6
7 /**
8  * Controller for image style addition forms.
9  *
10  * @internal
11  */
12 class ImageStyleAddForm extends ImageStyleFormBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   public function submitForm(array &$form, FormStateInterface $form_state) {
18     parent::submitForm($form, $form_state);
19     $this->messenger()->addStatus($this->t('Style %name was created.', ['%name' => $this->entity->label()]));
20   }
21
22   /**
23    * {@inheritdoc}
24    */
25   public function actions(array $form, FormStateInterface $form_state) {
26     $actions = parent::actions($form, $form_state);
27     $actions['submit']['#value'] = $this->t('Create new style');
28
29     return $actions;
30   }
31
32 }