ImageStyleAddForm.php in Drupal 8
File
core/modules/image/src/Form/ImageStyleAddForm.php
View source
<?php
namespace Drupal\image\Form;
use Drupal\Core\Form\FormStateInterface;
class ImageStyleAddForm extends ImageStyleFormBase {
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this
->messenger()
->addStatus($this
->t('Style %name was created.', [
'%name' => $this->entity
->label(),
]));
}
public function actions(array $form, FormStateInterface $form_state) {
$actions = parent::actions($form, $form_state);
$actions['submit']['#value'] = $this
->t('Create new style');
return $actions;
}
}