You are here

public function ImageAPIOptimizeProcessorEditForm::buildForm in Image Optimize (or ImageAPI Optimize) 8.3

Same name and namespace in other branches
  1. 8.2 src/Form/ImageAPIOptimizeProcessorEditForm.php \Drupal\imageapi_optimize\Form\ImageAPIOptimizeProcessorEditForm::buildForm()
  2. 4.x src/Form/ImageAPIOptimizeProcessorEditForm.php \Drupal\imageapi_optimize\Form\ImageAPIOptimizeProcessorEditForm::buildForm()

Parameters

\Drupal\imageapi_optimize\ImageAPIOptimizePipelineInterface $imageapi_optimize_pipeline: The image optimize pipeline.

string $imageapi_optimize_processor: The image optimize processor ID.

Return value

array The form structure.

Throws

\Symfony\Component\HttpKernel\Exception\NotFoundHttpException

Overrides ImageAPIOptimizeProcessorFormBase::buildForm

File

src/Form/ImageAPIOptimizeProcessorEditForm.php, line 16

Class

ImageAPIOptimizeProcessorEditForm
Provides an edit form for image optimize processors.

Namespace

Drupal\imageapi_optimize\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, ImageAPIOptimizePipelineInterface $imageapi_optimize_pipeline = NULL, $imageapi_optimize_processor = NULL) {
  $form = parent::buildForm($form, $form_state, $imageapi_optimize_pipeline, $imageapi_optimize_processor);
  $form['#title'] = $this
    ->t('Edit %label processor', [
    '%label' => $this->imageAPIOptimizeProcessor
      ->label(),
  ]);
  $form['actions']['submit']['#value'] = $this
    ->t('Update processor');
  return $form;
}