You are here

function theme_googleanalytics_admin_custom_var_table in Google Analytics 7

Same name and namespace in other branches
  1. 6.4 googleanalytics.admin.inc \theme_googleanalytics_admin_custom_var_table()
  2. 6.3 googleanalytics.admin.inc \theme_googleanalytics_admin_custom_var_table()
  3. 7.2 googleanalytics.admin.inc \theme_googleanalytics_admin_custom_var_table()

Layout for the custom variables table in the admin settings form.

1 theme call to theme_googleanalytics_admin_custom_var_table()
googleanalytics_admin_settings_form in ./googleanalytics.admin.inc
Implements hook_admin_settings() for module settings configuration.

File

./googleanalytics.admin.inc, line 485
Administrative page callbacks for the googleanalytics module.

Code

function theme_googleanalytics_admin_custom_var_table($variables) {
  $form = $variables['form'];
  $header = array(
    array(
      'data' => t('Slot'),
    ),
    array(
      'data' => t('Name'),
    ),
    array(
      'data' => t('Value'),
    ),
    array(
      'data' => t('Scope'),
    ),
  );
  $rows = array();
  foreach (element_children($form['slots']) as $key => $id) {
    $rows[] = array(
      'data' => array(
        drupal_render($form['slots'][$id]['slot']),
        drupal_render($form['slots'][$id]['name']),
        drupal_render($form['slots'][$id]['value']),
        drupal_render($form['slots'][$id]['scope']),
      ),
    );
  }
  $output = theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
  $output .= drupal_render($form['googleanalytics_custom_var_description']);
  $output .= drupal_render($form['googleanalytics_custom_var_token_tree']);
  return $output;
}