function media_gallery_get_file_ids in Media Gallery 7.2
Same name and namespace in other branches
- 7 media_gallery.module \media_gallery_get_file_ids()
Returns all file IDs attached to a media gallery node.
5 calls to media_gallery_get_file_ids()
- media_gallery_edit_item_access in ./
media_gallery.module - Access callback for editing a media item in a gallery.
- media_gallery_get_media_type_count in ./
media_gallery.module - Returns the number of files of each type attached to a media gallery node.
- media_gallery_mg_item_load in ./
media_gallery.module - Load a file object from the database, if it is part of the media_gallery node.
- media_gallery_remove_item_access in ./
media_gallery.module - Access callback for removing a media item from a gallery.
- media_gallery_view_item_access in ./
media_gallery.module - Access callback for viewing a media item in a gallery.
File
- ./
media_gallery.module, line 836
Code
function media_gallery_get_file_ids($node, $media_field = 'media_gallery_file') {
$fids = array();
$media_items = _media_gallery_field_get_items('node', $node, $media_field);
if ($media_items !== FALSE) {
foreach ($media_items as $item) {
$fids[] = _media_gallery_get_media_fid($item);
}
}
return drupal_map_assoc($fids);
}