public function ImageStyleWithPipeline::getPipelineEntity in Image Optimize (or ImageAPI Optimize) 4.x
Same name and namespace in other branches
- 8.3 src/Entity/ImageStyleWithPipeline.php \Drupal\imageapi_optimize\Entity\ImageStyleWithPipeline::getPipelineEntity()
- 8.2 src/Entity/ImageStyleWithPipeline.php \Drupal\imageapi_optimize\Entity\ImageStyleWithPipeline::getPipelineEntity()
Return value
\Drupal\imageapi_optimize\Entity\ImageAPIOptimizePipeline|null
1 call to ImageStyleWithPipeline::getPipelineEntity()
File
- src/
Entity/ ImageStyleWithPipeline.php, line 44
Class
Namespace
Drupal\imageapi_optimize\EntityCode
public function getPipelineEntity() {
if (!empty($this->pipeline)) {
$storage = $this
->entityTypeManager()
->getStorage('imageapi_optimize_pipeline');
if ($this->pipeline == '__default__') {
if ($default_pipeline_name = \Drupal::config('imageapi_optimize.settings')
->get('default_pipeline')) {
$pipelineId = $default_pipeline_name;
}
}
else {
$pipelineId = $this->pipeline;
}
if (!empty($pipelineId) && ($pipeline = $storage
->load($pipelineId))) {
return $pipeline;
}
}
}