ImageStyleAddForm.php 709 Bytes
Newer Older
1 2 3 4
<?php

namespace Drupal\image\Form;

5 6
use Drupal\Core\Form\FormStateInterface;

7 8
/**
 * Controller for image style addition forms.
9 10
 *
 * @internal
11 12 13 14 15 16
 */
class ImageStyleAddForm extends ImageStyleFormBase {

  /**
   * {@inheritdoc}
   */
17 18
  public function submitForm(array &$form, FormStateInterface $form_state) {
    parent::submitForm($form, $form_state);
19
    drupal_set_message($this->t('Style %name was created.', ['%name' => $this->entity->label()]));
20 21 22 23 24
  }

  /**
   * {@inheritdoc}
   */
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 30 31 32

    return $actions;
  }

}