You are here

function theme_asset_admin_formatter_defaults in Asset 6

Same name and namespace in other branches
  1. 5 asset.module \theme_asset_admin_formatter_defaults()

File

inc/asset.themes.inc, line 38

Code

function theme_asset_admin_formatter_defaults($form) {
  $formatters = asset_get_formatters();
  foreach ($formatters as $type => $exts) {
    $rows = array();
    foreach ($exts as $ext => $formats) {
      unset($form[$type]['asset_default_formatter_' . $type . '_' . $ext]['#title']);
      unset($form[$type]['asset_default_formatter_teaser_' . $type . '_' . $ext]['#title']);
      $rows[] = array(
        $ext,
        drupal_render($form[$type]['asset_default_formatter_' . $type . '_' . $ext]),
        drupal_render($form[$type]['asset_default_formatter_teaser_' . $type . '_' . $ext]),
      );
    }
    $form[$type]['#value'] = theme('table', array(
      '',
      'Full Page',
      'Teaser',
    ), $rows);
  }
  return drupal_render($form);
}