function imagefield_crop_presets_load_multiple_by_name in Imagefield Crop 7.3
Helper function imagefield_crop_presets_load_multiple_by_name(). Used to load multiple presets.
Parameters
$pids:
Return value
mixed
6 calls to imagefield_crop_presets_load_multiple_by_name()
- imagefield_crop_field_formatter_settings_form in ./
imagefield_crop.module - Implements hook_field_formatter_settings_form().
- imagefield_crop_field_insert in ./
imagefield_crop.module - Implements hook_field_insert().
- imagefield_crop_field_update in ./
imagefield_crop.module - Implements hook_field_update().
- imagefield_crop_preset_load_by_name in ./
imagefield_crop.module - Implements hook_load().
- imagefield_crop_widget_preview_process in ./
imagefield_crop.module - Impletement imagefield_crop_widget_preview_process().
File
- ./
imagefield_crop.module, line 1220
Code
function imagefield_crop_presets_load_multiple_by_name($names = array()) {
$query = db_select('imagefield_crop_preset', 'icpr')
->fields('icpr');
if (!empty($names)) {
$query
->condition('name', $names, 'IN');
}
$result = $query
->execute()
->fetchAllAssoc('pid');
foreach ($result as &$preset) {
$preset->data = unserialize($preset->data);
}
return $result;
}