You are here

protected static function ImageAPIOptimizePipeline::replaceImageAPIOptimizePipeline in Image Optimize (or ImageAPI Optimize) 4.x

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

Update field settings if the image optimize pipeline name is changed.

Parameters

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

1 call to ImageAPIOptimizePipeline::replaceImageAPIOptimizePipeline()
ImageAPIOptimizePipeline::postSave in src/Entity/ImageAPIOptimizePipeline.php
Acts on a saved entity before the insert or update hook is invoked.

File

src/Entity/ImageAPIOptimizePipeline.php, line 136

Class

ImageAPIOptimizePipeline
Defines an image optimize pipeline configuration entity.

Namespace

Drupal\imageapi_optimize\Entity

Code

protected static function replaceImageAPIOptimizePipeline(ImageAPIOptimizePipelineInterface $pipeline) {
  if ($pipeline
    ->id() != $pipeline
    ->getOriginalId()) {

    // Loop through all image optimize pipelines looking for usages.
  }
}