public function ImageAPIOptimizePipeline::addProcessor in Image Optimize (or ImageAPI Optimize) 4.x
Same name and namespace in other branches
- 8.3 src/Entity/ImageAPIOptimizePipeline.php \Drupal\imageapi_optimize\Entity\ImageAPIOptimizePipeline::addProcessor()
- 8.2 src/Entity/ImageAPIOptimizePipeline.php \Drupal\imageapi_optimize\Entity\ImageAPIOptimizePipeline::addProcessor()
Saves an image optimize processor for this pipeline.
Parameters
array $configuration: An array of image optimize processor configuration.
Return value
string The image optimize processor ID.
Overrides ImageAPIOptimizePipelineInterface::addProcessor
File
- src/
Entity/ ImageAPIOptimizePipeline.php, line 255
Class
- ImageAPIOptimizePipeline
- Defines an image optimize pipeline configuration entity.
Namespace
Drupal\imageapi_optimize\EntityCode
public function addProcessor(array $configuration) {
$configuration['uuid'] = $this
->uuidGenerator()
->generate();
$this
->getProcessors()
->addInstanceId($configuration['uuid'], $configuration);
return $configuration['uuid'];
}