class ImageEffectEditForm in Drupal 10
Same name and namespace in other branches
- 8 core/modules/image/src/Form/ImageEffectEditForm.php \Drupal\image\Form\ImageEffectEditForm
- 9 core/modules/image/src/Form/ImageEffectEditForm.php \Drupal\image\Form\ImageEffectEditForm
Provides an edit form for image effects.
@internal
Hierarchy
- class \Drupal\Core\Form\FormBase implements ContainerInjectionInterface, FormInterface uses DependencySerializationTrait, LoggerChannelTrait, MessengerTrait, RedirectDestinationTrait, StringTranslationTrait
- class \Drupal\image\Form\ImageEffectFormBase
- class \Drupal\image\Form\ImageEffectEditForm
- class \Drupal\image\Form\ImageEffectFormBase
Expanded class hierarchy of ImageEffectEditForm
1 file declares its use of ImageEffectEditForm
- ImageEffectsTest.php in core/
modules/ image/ tests/ src/ Kernel/ ImageEffectsTest.php
1 string reference to 'ImageEffectEditForm'
- image.routing.yml in core/
modules/ image/ image.routing.yml - core/modules/image/image.routing.yml
File
- core/
modules/ image/ src/ Form/ ImageEffectEditForm.php, line 13
Namespace
Drupal\image\FormView source
class ImageEffectEditForm extends ImageEffectFormBase {
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state, ImageStyleInterface $image_style = NULL, $image_effect = NULL) {
$form = parent::buildForm($form, $form_state, $image_style, $image_effect);
$form['#title'] = $this
->t('Edit %label effect on style %style', [
'%label' => $this->imageEffect
->label(),
'%style' => $image_style
->label(),
]);
$form['actions']['submit']['#value'] = $this
->t('Update effect');
return $form;
}
/**
* {@inheritdoc}
*/
protected function prepareImageEffect($image_effect) {
return $this->imageStyle
->getEffect($image_effect);
}
}