You are here

class ImageEffectEditForm in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/image/src/Form/ImageEffectEditForm.php \Drupal\image\Form\ImageEffectEditForm
  2. 9 core/modules/image/src/Form/ImageEffectEditForm.php \Drupal\image\Form\ImageEffectEditForm

Provides an edit form for image effects.

@internal

Hierarchy

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\Form
View 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);
  }

}

Members