You are here

function html5_media_field_formatter_settings_summary in HTML5 Media 7

Implements hook_field_formatter_settings_summary

File

./html5_media.module, line 397

Code

function html5_media_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = '';
  if ($display['type'] == 'html5_player') {
    $header = array(
      'Setting',
      'Value',
    );
    $rows = array();
    foreach ($settings as $name => $value) {
      $rows[] = array(
        $name,
        $value,
      );
    }
    $summary = theme('table', array(
      'header' => $header,
      'rows' => $rows,
    ));
  }
  return $summary;
}