You are here

function theme_scald_dailymotion_imports_table in Scald: Media Management made easy 6

Themes the current imports form.

1 theme call to theme_scald_dailymotion_imports_table()
scald_dailymotion_imports_form in scald_dailymotion/scald_dailymotion.admin.inc
Defines the import settings form.

File

scald_dailymotion/scald_dailymotion.admin.inc, line 98
Provides admin form for DailyMotion's Scald Provider.

Code

function theme_scald_dailymotion_imports_table($form) {
  $headers = array(
    t('Type'),
    t('Identifier'),
  );
  $rows = array();
  foreach (element_children($form) as $key) {

    // Unset per widget titles, they're already in the column title
    $form[$key]['type']['#title'] = $form[$key]['value']['#title'] = '';

    // Render our row
    $row = array();
    $row[] = drupal_render($form[$key]['type']);
    $row[] = drupal_render($form[$key]['value']);

    // And add it to the list of table rows.
    $rows[] = $row;
  }
  return theme('table', $headers, $rows);
}