You are here

function theme_themekey_ui_theme_select_form in ThemeKey 7.2

Same name and namespace in other branches
  1. 6.4 themekey_ui_admin.inc \theme_themekey_ui_theme_select_form()
  2. 6.2 themekey_ui_admin.inc \theme_themekey_ui_theme_select_form()
  3. 6.3 themekey_ui_admin.inc \theme_themekey_ui_theme_select_form()
  4. 7.3 themekey_ui_admin.inc \theme_themekey_ui_theme_select_form()
  5. 7 themekey_ui_admin.inc \theme_themekey_ui_theme_select_form()

Theme the theme select form.

Parameters

$form: An associative array containing the structure of the form.

See also

theme_system_theme_select_form()

1 theme call to theme_themekey_ui_theme_select_form()
themekey_ui_theme_build_select_form in ./themekey_ui_admin.inc
Internal function to add a theme selector to a form.

File

./themekey_ui_admin.inc, line 396

Code

function theme_themekey_ui_theme_select_form($form) {
  $rows = array();
  foreach (element_children($form['form']) as $key) {
    $row = array();
    if (isset($form['form'][$key]['description']) && is_array($form['form'][$key]['description'])) {
      $row[] = drupal_render($form['form'][$key]['screenshot']);
      $row[] = drupal_render($form['form'][$key]['description']);
      $row[] = drupal_render($form['form'][$form['form']['#themekey_ui_theme_select_form_element_key']][$key]);
    }
    $rows[] = $row;
  }
  if (!empty($rows)) {
    $header = array(
      t('Screenshot'),
      t('Name'),
      t('Selected'),
    );
    $output = theme('table', array(
      'header' => $header,
      'rows' => $rows,
    ));
    return $output;
  }
}