function media_gallery_entity_info_alter in Media Gallery 7
Same name and namespace in other branches
- 7.2 media_gallery.module \media_gallery_entity_info_alter()
Implements hook_entity_info_alter().
File
- ./
media_gallery.module, line 882
Code
function media_gallery_entity_info_alter(&$entity_info) {
// Add view modes for displaying files in gallery contexts.
foreach (media_gallery_file_view_modes() as $view_mode => $label) {
$entity_info['file']['view modes'][$view_mode] = array(
'label' => $label,
'custom settings' => FALSE,
);
}
// Add a view mode for media_gallery_block_view() to use for displaying a
// media gallery node in a block. Drupal does not support restricting view
// modes to specific bundles.
$entity_info['node']['view modes']['media_gallery_block'] = array(
'label' => t('Media gallery block'),
'custom settings' => FALSE,
);
}