You are here

public function ImageAPIOptimizePipeline::deleteProcessor in Image Optimize (or ImageAPI Optimize) 8.2

Same name and namespace in other branches
  1. 8.3 src/Entity/ImageAPIOptimizePipeline.php \Drupal\imageapi_optimize\Entity\ImageAPIOptimizePipeline::deleteProcessor()
  2. 4.x src/Entity/ImageAPIOptimizePipeline.php \Drupal\imageapi_optimize\Entity\ImageAPIOptimizePipeline::deleteProcessor()

Deletes an image optimize processor from this pipeline.

Parameters

\Drupal\imageapi_optimize\ImageAPIOptimizeProcessorInterface $processor: The image optimize processor object.

Return value

$this

Overrides ImageAPIOptimizePipelineInterface::deleteProcessor

File

src/Entity/ImageAPIOptimizePipeline.php, line 214

Class

ImageAPIOptimizePipeline
Defines an image optimize pipeline configuration entity.

Namespace

Drupal\imageapi_optimize\Entity

Code

public function deleteProcessor(ImageAPIOptimizeProcessorInterface $processor) {
  $this
    ->getProcessors()
    ->removeInstanceId($processor
    ->getUuid());
  $this
    ->save();
  return $this;
}