function theme_ldap_query in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_query/ldap_query.theme.inc \theme_ldap_query()
- 7 ldap_query/ldap_query.theme.inc \theme_ldap_query()
Returns HTML for ldap server.
Parameters
$variables: An associative array containing:
- ldap_query_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_query()
- ldap_query_admin_delete in ldap_query/
ldap_query.admin.inc - Implements the LDAP query delete page.
- ldap_query_admin_enable_disable in ldap_query/
ldap_query.admin.inc - Implements the LDAP query disable
- theme_ldap_query_results in ldap_query/
ldap_query.theme.inc
File
- ldap_query/
ldap_query.theme.inc, line 72 - theming functions for ldap_query module
Code
function theme_ldap_query($variables) {
extract($variables);
// $ldap_query, $actions, $type (see above)
ldap_servers_module_load_include('php', 'ldap_query', 'LdapQuery.class');
$properties = array();
foreach (LdapQuery::fields() as $field_id => $field) {
$value = $ldap_query->{$field['property_name']};
if (is_scalar($value)) {
$properties[] = $field_id . " = " . $value;
// $value";
}
}
if ($actions) {
$admin = new LdapQueryAdmin($ldap_query->sid);
$properties = join(' | ', $admin
->getActions());
}
$output = theme_item_list(array(
'items' => $properties,
'type' => 'ul',
'title' => 'Query Properties',
'attributes' => array(),
));
return $output;
}