function theme_ldap_servers_server 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_servers_server()
- 7 ldap_servers/ldap_servers.theme.inc \theme_ldap_servers_server()
Returns HTML for ldap server.
Parameters
$variables: An associative array containing:
- ldap_servers_config: an array of one or more ldap server configurations.
- actions: true or false indicating include update, delete, etc. links
- type: 'table', 'list', etc for style to render
3 theme calls to theme_ldap_servers_server()
- ldap_servers_admin_delete in ldap_servers/
ldap_servers.admin.inc - Implements the LDAP server delete page.
- ldap_servers_admin_enable_disable in ldap_servers/
ldap_servers.admin.inc - Implements the LDAP server delete page.
- ldap_servers_test_form in ldap_servers/
ldap_servers.test_form.inc - Implements the LDAP server test page.
File
- ldap_servers/
ldap_servers.theme.inc, line 70 - theming functions for ldap_servers module
Code
function theme_ldap_servers_server($variables) {
extract($variables);
// $ldap_server, $actions, $type (see above)
ldap_servers_module_load_include('php', 'ldap_servers', 'LdapServer.class');
$properties = array();
foreach (LdapServer::field_to_properties_map() as $field_name => $property_name) {
$properties[] = "{$field_name} = " . print_r($ldap_server->{$property_name}, TRUE);
}
if ($actions) {
$admin = new LdapServerAdmin($ldap_server->sid);
$properties = join(' | ', $admin
->getLdapServerActions());
}
$output = theme_item_list(array(
'items' => $properties,
'type' => 'ul',
'title' => 'Server Properties',
'attributes' => array(),
));
return $output;
}