function imagepicker_get_image_groups in Image Picker 7
Same name and namespace in other branches
- 5.2 imagepicker.module \imagepicker_get_image_groups()
- 5 imagepicker.module \imagepicker_get_image_groups()
- 6.2 imagepicker.functions.inc \imagepicker_get_image_groups()
2 calls to imagepicker_get_image_groups()
- imagepicker_copy_form_submit in ./
imagepicker.functions.inc - Function to submit the copy form
- imagepicker_group_images_form in ./
imagepicker.functions.inc - Insert a form into the edit image page to allow the image to be associated with a group.
File
- ./
imagepicker.functions.inc, line 1810 - @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function imagepicker_get_image_groups($img_id) {
$data = array();
$query = db_select('imagepicker_group_images', 'i');
$query
->fields('i', array(
'gid',
));
$query
->condition('i.img_id', $img_id);
$rows = $query
->execute();
foreach ($rows as $row) {
$data[] = $row->gid;
}
return $data;
}