class ImageStyleAddForm in Drupal 10
Same name and namespace in other branches
- 8 core/modules/image/src/Form/ImageStyleAddForm.php \Drupal\image\Form\ImageStyleAddForm
- 9 core/modules/image/src/Form/ImageStyleAddForm.php \Drupal\image\Form\ImageStyleAddForm
Controller for image style addition forms.
@internal
Hierarchy
- class \Drupal\Core\Form\FormBase implements ContainerInjectionInterface, FormInterface uses DependencySerializationTrait, LoggerChannelTrait, MessengerTrait, RedirectDestinationTrait, StringTranslationTrait
- class \Drupal\Core\Entity\EntityForm implements EntityFormInterface
- class \Drupal\image\Form\ImageStyleFormBase
- class \Drupal\image\Form\ImageStyleAddForm
- class \Drupal\image\Form\ImageStyleFormBase
- class \Drupal\Core\Entity\EntityForm implements EntityFormInterface
Expanded class hierarchy of ImageStyleAddForm
File
- core/
modules/ image/ src/ Form/ ImageStyleAddForm.php, line 12
Namespace
Drupal\image\FormView source
class ImageStyleAddForm extends ImageStyleFormBase {
/**
* {@inheritdoc}
*/
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(),
]));
}
/**
* {@inheritdoc}
*/
public function actions(array $form, FormStateInterface $form_state) {
$actions = parent::actions($form, $form_state);
$actions['submit']['#value'] = $this
->t('Create new style');
return $actions;
}
}