You are here

function theme_page_title_admin_settings_patterns in Page Title 5.2

Theme function for the page title admin settings pattern table

1 theme call to theme_page_title_admin_settings_patterns()
page_title_admin_settings in ./page_title.admin.inc
Displays the form for the standard settings tab.

File

./page_title.admin.inc, line 147
Anything for the admin section should go in this file.

Code

function theme_page_title_admin_settings_patterns($form) {
  $rows = array();
  foreach (element_children($form['pattern']) as $key) {
    $title = array(
      '#type' => 'item',
      '#title' => $form['pattern'][$key]['#title'],
      '#required' => $form['pattern'][$key]['#required'],
    );
    unset($form['pattern'][$key]['#title']);
    $row = array(
      drupal_render($title),
      drupal_render($form['scope'][$key]),
      drupal_render($form['pattern'][$key]),
      isset($form['showfield'][$key . '_showfield']) ? drupal_render($form['showfield'][$key . '_showfield']) : '',
    );
    $rows[] = $row;
  }
  return theme('table', array(
    t('Page Type'),
    t('Token Scope'),
    t('Pattern'),
    t('Show Field'),
  ), $rows);
}