You are here

function imageapi_optimize_processor_save in Image Optimize (or ImageAPI Optimize) 7.2

Saves an image processor.

Parameters

$processor: An image processor array.

Return value

An image processor array. In the case of a new processor, 'ieid' will be set.

4 calls to imageapi_optimize_processor_save()
imageapi_optimize_default_pipeline_save in ./imageapi_optimize.module
Saves a default image pipeline to the database.
imageapi_optimize_pipeline_form_add_submit in ./imageapi_optimize.admin.inc
Submit handler for adding a new image effect to an image pipeline.
imageapi_optimize_pipeline_form_submit in ./imageapi_optimize.admin.inc
Submit handler for saving an image pipeline.
imageapi_optimize_processor_form_submit in ./imageapi_optimize.admin.inc
Submit handler for updating an image effect.

File

./imageapi_optimize.module, line 680

Code

function imageapi_optimize_processor_save($processor) {
  if (!empty($processor['ieid'])) {
    drupal_write_record('imageapi_optimize_processors', $processor, 'ieid');
  }
  else {
    drupal_write_record('imageapi_optimize_processors', $processor);
  }
  $pipeline = imageapi_optimize_pipeline_load(NULL, $processor['isid']);
  imageapi_optimize_pipeline_flush($pipeline);
  return $processor;
}