function imagefield_crop_presets_load_multiple in Imagefield Crop 7.3
Helper function imagefield_crop_presets_load_multiple(). Used to load multiple presets.
Parameters
$pids:
Return value
mixed
2 calls to imagefield_crop_presets_load_multiple()
- imagefield_crop_field_widget_settings_form in ./
imagefield_crop.module - Implements hook_field_widget_settings_form().
- imagefield_crop_preset_load in ./
imagefield_crop.module - Implements hook_load().
File
- ./
imagefield_crop.module, line 1202
Code
function imagefield_crop_presets_load_multiple($pids = array()) {
$query = db_select('imagefield_crop_preset', 'icpr')
->fields('icpr');
if (!empty($pids)) {
$query
->condition('pid', $pids);
}
$result = $query
->execute()
->fetchAllAssoc('pid');
foreach ($result as &$preset) {
$preset->data = unserialize($preset->data);
}
return $result;
}