function theme_ldap_server_token_table in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_servers/ldap_servers.theme.inc \theme_ldap_server_token_table()
- 7 ldap_servers/ldap_servers.theme.inc \theme_ldap_server_token_table()
File
- ldap_servers/
ldap_servers.theme.inc, line 109 - 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;
}