function ldap_servers_schema in Lightweight Directory Access Protocol (LDAP) 7
Same name and namespace in other branches
- 8.2 ldap_servers/ldap_servers.install \ldap_servers_schema()
- 7.2 ldap_servers/ldap_servers.install \ldap_servers_schema()
Implements hook_schema().
File
- ldap_servers/
ldap_servers.install, line 66 - Install, update and uninstall functions for the LDAP API module.
Code
function ldap_servers_schema() {
module_load_include('inc', 'ldap_servers', 'ldap_servers.functions');
ldap_server_module_load_include('module', 'ldap_servers', 'ldap_servers');
// to get the LDAP_SERVERS_ENC_TYPE_CLEARTEXT constants issue#1209576
ldap_server_module_load_include('php', 'ldap_servers', 'LdapServerAdmin.class');
$schema['ldap_servers'] = array(
'export' => array(
'key' => 'sid',
'key name' => 'Server ID',
'primary key' => 'numeric_sid',
'identifier' => 'ldap_servers_conf',
'api' => array(
'owner' => 'ldap_servers',
'api' => 'ldap_servers',
'minimum_version' => 1,
'current_version' => 1,
),
),
'primary key' => array(
'numeric_sid',
),
'unique keys' => array(
'name' => array(
'name',
),
),
);
$fields = LdapServerAdmin::fields();
foreach ($fields as $name => $props) {
if (isset($props['schema'])) {
$schema['ldap_servers']['fields'][$name] = $props['schema'];
}
}
return $schema;
}