You are here

function theme_googleanalytics_admin_custom_var_table in Google Analytics 7.2

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 googleanalytics.admin.inc \theme_googleanalytics_admin_custom_var_table()

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

Parameters

array $variables: An array contains the form elements.

Return value

string The rendered output.

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 577
Administrative page callbacks for the googleanalytics module.

Code

function theme_googleanalytics_admin_custom_var_table($variables) {
  $form = $variables['form'];
  $header = array(
    array(
      'data' => t('Index'),
    ),
    array(
      'data' => t('Value'),
    ),
  );
  $rows = array();
  foreach (element_children($form['indexes']) as $id) {
    $rows[] = array(
      'data' => array(
        drupal_render($form['indexes'][$id]['index']),
        drupal_render($form['indexes'][$id]['value']),
      ),
    );
  }
  $output = theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
  $output .= drupal_render($form['googleanalytics_description']);
  if (isset($form['googleanalytics_token_tree'])) {
    $output .= drupal_render($form['googleanalytics_token_tree']);
  }
  return $output;
}