function focal_point_get_multiple in Focal Point 7
Returns the focal points of the given images.
Parameters
array $fids: An array of file IDs.
Return value
array An array of focal points keyed by file IDs.
See also
2 calls to focal_point_get_multiple()
- focal_point_file_load in ./
focal_point.module - Implements hook_file_load().
- focal_point_get in ./
focal_point.module - Returns the focal point of the given image.
1 string reference to 'focal_point_get_multiple'
- focal_point_save in ./
focal_point.module - Save the focal point data for a given file.
File
- ./
focal_point.module, line 428
Code
function focal_point_get_multiple($fids) {
$focal_points =& drupal_static(__FUNCTION__, array());
$missing = array_diff($fids, array_keys($focal_points));
if ($missing) {
$result = db_query('SELECT fid, focal_point FROM {focal_point} WHERE fid IN (:fids)', array(
':fids' => $missing,
))
->fetchAllKeyed();
$focal_points += $result;
}
return array_intersect_key($focal_points, drupal_map_assoc($fids));
}