You are here

protected function ImageAPIOptimizePipelineDeleteForm::getReplacementOptions in Image Optimize (or ImageAPI Optimize) 8.2

Same name and namespace in other branches
  1. 8.3 src/Form/ImageAPIOptimizePipelineDeleteForm.php \Drupal\imageapi_optimize\Form\ImageAPIOptimizePipelineDeleteForm::getReplacementOptions()
  2. 4.x src/Form/ImageAPIOptimizePipelineDeleteForm.php \Drupal\imageapi_optimize\Form\ImageAPIOptimizePipelineDeleteForm::getReplacementOptions()

Returns a list of image optimize pipeline replacement options.

Return value

array An option list suitable for the form select '#options'.

2 calls to ImageAPIOptimizePipelineDeleteForm::getReplacementOptions()
ImageAPIOptimizePipelineDeleteForm::form in src/Form/ImageAPIOptimizePipelineDeleteForm.php
Gets the actual form array to be built.
ImageAPIOptimizePipelineDeleteForm::getDescription in src/Form/ImageAPIOptimizePipelineDeleteForm.php
Returns additional text to display as a description.

File

src/Form/ImageAPIOptimizePipelineDeleteForm.php, line 77

Class

ImageAPIOptimizePipelineDeleteForm
Creates a form to delete an image optimize pipeline.

Namespace

Drupal\imageapi_optimize\Form

Code

protected function getReplacementOptions() {
  if (!isset($this->replacementOptions)) {
    $this->replacementOptions = array_diff_key(imageapi_optimize_pipeline_options(), [
      $this
        ->getEntity()
        ->id() => '',
    ]);
  }
  return $this->replacementOptions;
}