You are here

function imagefield_crop_fill_cropconfig in Imagefield Crop 7.3

Helper function imagefield_crop_fill_cropconfig(). Fill new cropconfig array

Parameters

$item:

$crop_area_height:

$crop_area_width:

Return value

array

1 call to imagefield_crop_fill_cropconfig()
imagefield_crop_widget_process in ./imagefield_crop.module
An element #process callback for the imagefield_crop field type.

File

./imagefield_crop.module, line 1351

Code

function imagefield_crop_fill_cropconfig($preset, $crop_area_height, $crop_area_width) {
  return array(
    'cropbox_x' => isset($preset->cropbox_x) ? $preset->cropbox_x : 0,
    'cropbox_y' => isset($preset->cropbox_y) ? $preset->cropbox_y : 0,
    'cropbox_height' => isset($preset->cropbox_height) ? $preset->cropbox_height : $crop_area_height,
    'cropbox_width' => isset($preset->cropbox_width) ? $preset->cropbox_width : $crop_area_width,
    'cropbox_changed' => isset($preset->cropbox_changed) ? $preset->cropbox_changed : 0,
  );
}