class ImageStyleAddForm
Same name and namespace in other branches
- 11.x core/modules/image/src/Form/ImageStyleAddForm.php \Drupal\image\Form\ImageStyleAddForm
Controller for image style addition forms.
@internal
Hierarchy
- class \Drupal\Core\Form\FormBase extends \Drupal\Core\Form\FormInterface, \Drupal\Core\DependencyInjection\ContainerInjectionInterface uses \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Logger\LoggerChannelTrait, \Drupal\Core\Messenger\MessengerTrait, \Drupal\Core\Routing\RedirectDestinationTrait, \Drupal\Core\StringTranslation\StringTranslationTrait
- class \Drupal\Core\Entity\EntityForm extends \Drupal\Core\Entity\EntityFormInterface implements \Drupal\Core\Form\FormBase
- class \Drupal\image\Form\ImageStyleFormBase implements \Drupal\Core\Entity\EntityForm
- class \Drupal\image\Form\ImageStyleAddForm implements \Drupal\image\Form\ImageStyleFormBase
- class \Drupal\image\Form\ImageStyleFormBase implements \Drupal\Core\Entity\EntityForm
- class \Drupal\Core\Entity\EntityForm extends \Drupal\Core\Entity\EntityFormInterface implements \Drupal\Core\Form\FormBase
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;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.