Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / image / src / Form / ImageEffectEditForm.php
1 <?php
2
3 namespace Drupal\image\Form;
4
5 use Drupal\Core\Form\FormStateInterface;
6 use Drupal\image\ImageStyleInterface;
7
8 /**
9  * Provides an edit form for image effects.
10  */
11 class ImageEffectEditForm extends ImageEffectFormBase {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function buildForm(array $form, FormStateInterface $form_state, ImageStyleInterface $image_style = NULL, $image_effect = NULL) {
17     $form = parent::buildForm($form, $form_state, $image_style, $image_effect);
18
19     $form['#title'] = $this->t('Edit %label effect', ['%label' => $this->imageEffect->label()]);
20     $form['actions']['submit']['#value'] = $this->t('Update effect');
21
22     return $form;
23   }
24
25   /**
26    * {@inheritdoc}
27    */
28   protected function prepareImageEffect($image_effect) {
29     return $this->imageStyle->getEffect($image_effect);
30   }
31
32 }