You are here

function theme_ldap_server_token_table in Lightweight Directory Access Protocol (LDAP) 7

Same name and namespace in other branches
  1. 8.2 ldap_servers/ldap_servers.theme.inc \theme_ldap_server_token_table()
  2. 7.2 ldap_servers/ldap_servers.theme.inc \theme_ldap_server_token_table()

File

ldap_servers/ldap_servers.theme.inc, line 111
theming functions for ldap_servers module

Code

function theme_ldap_server_token_table($variables) {
  $header = array(
    array(
      'data' => 'Token',
      'sort' => 'asc',
    ),
    array(
      'data' => 'Value',
    ),
  );
  foreach ($variables['tokens'] as $token => $value) {
    $rows[] = array(
      'data' => array(
        $token,
        $value,
      ),
    );
  }
  $token_table = '<div class="content"><h2>' . t('Available Tokens') . '</h2>' . theme_table(array(
    'colgroups' => NULL,
    'caption' => 'tokens',
    'header' => $header,
    'rows' => $rows,
    'sticky' => TRUE,
    'attributes' => array(),
    'empty' => 'No data',
  )) . '</div>';
  return $token_table;
}