Commit 104629d5 authored by Yan Loetzer's avatar Yan Loetzer Committed by Yan Loetzer
Browse files

Issue #1957554 by rlmumford : Updated comments for helper function...

Issue #1957554 by rlmumford : Updated comments for helper function media_pane_get_view_mode_options.
parent f9df1841
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -43,12 +43,14 @@ function media_pane_entity_info_alter(&$entity_info) {

/**
 * Helper function to collect all available view modes for the file entity.
 *
 * @return array
 *   Return an array of view modes keyed by machine name.
 */
function media_pane_get_view_mode_options() {
  $options = array('default' => t('Default'));

  $file_info = entity_get_info('file');
  $file_info = entity_get_info('fieldable_panels_pane');
  foreach ($file_info['view modes'] as $name => $def) {
    $options[$name] = $def['label'];
  }