You are here

public function ImageEffectEditForm::buildForm in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/image/src/Form/ImageEffectEditForm.php \Drupal\image\Form\ImageEffectEditForm::buildForm()

Parameters

\Drupal\image\ImageStyleInterface $image_style: The image style.

string $image_effect: The image effect ID.

Return value

array The form structure.

Throws

\Symfony\Component\HttpKernel\Exception\NotFoundHttpException

Overrides ImageEffectFormBase::buildForm

File

core/modules/image/src/Form/ImageEffectEditForm.php, line 18

Class

ImageEffectEditForm
Provides an edit form for image effects.

Namespace

Drupal\image\Form

Code

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', [
    '%label' => $this->imageEffect
      ->label(),
  ]);
  $form['actions']['submit']['#value'] = $this
    ->t('Update effect');
  return $form;
}