You are here

function imageapi_optimize_default_pipeline_save in Image Optimize (or ImageAPI Optimize) 7.2

Saves a default image pipeline to the database.

Parameters

pipeline: An image pipeline array provided by a module.

Return value

An image pipeline array. The returned pipeline array will include the new 'isid' assigned to the pipeline.

1 call to imageapi_optimize_default_pipeline_save()
imageapi_optimize_pipeline_form_override_submit in ./imageapi_optimize.admin.inc
Submit handler for overriding a module-defined pipeline.

File

./imageapi_optimize.module, line 495

Code

function imageapi_optimize_default_pipeline_save($pipeline) {
  $pipeline = imageapi_optimize_pipeline_save($pipeline);
  $processors = array();
  foreach ($pipeline['processors'] as $processor) {
    $processor['isid'] = $pipeline['isid'];
    $processor = imageapi_optimize_processor_save($processor);
    $processors[$processor['ieid']] = $processor;
  }
  $pipeline['processors'] = $processors;
  return $pipeline;
}