class FormLdap (View source)

Class to manage generation of HTML components for ldap module

Properties

DoliDB $db
string $error
string[] $errors

Methods

__construct($db)

Constructor

selectLdapPasswordHashType($selected = 'md5', string $htmlname = 'ldaphashtype', $showempty = 0)

Return list of types of hash

selectLdapDnSynchroActive(int $selected = 0, string $htmlname = 'activesynchro', string[] $exclude = array(), int<0, 3> $scriptonly = 0, $showempty = 0)

Return list of type of synchronization

selectLdapServerType($selected = 'openldap', string $htmlname = 'type', $showempty = 0)

Return list of ldap server types

selectLdapServerProtocolVersion($selected = '3', string $htmlname = 'ldapprotocolversion', $showempty = 0)

Return list of ldap server protocol version

Details

__construct($db)

Constructor

@param DoliDB $db Database handler

Parameters

$db

selectLdapPasswordHashType($selected = 'md5', string $htmlname = 'ldaphashtype', $showempty = 0)

Return list of types of hash

@param string $selected Preselected type

Parameters

$selected
string $htmlname

Name of field in form @param int $showempty Add an empty field @return string HTML select string

$showempty

selectLdapDnSynchroActive(int $selected = 0, string $htmlname = 'activesynchro', string[] $exclude = array(), int<0, 3> $scriptonly = 0, $showempty = 0)

Return list of type of synchronization

Parameters

int $selected

Preselected type

string $htmlname

Name of field in form

string[] $exclude

Exclude values from the list

int<0, 3> $scriptonly

Add warning if synchro only work with a script (0 = disable, 1 = Dolibarr2ldap, 2 = ldap2dolibarr, 3 = all) @param int $showempty Add an empty field @return string HTML select string

$showempty

selectLdapServerType($selected = 'openldap', string $htmlname = 'type', $showempty = 0)

Return list of ldap server types

@param string $selected Preselected type

Parameters

$selected
string $htmlname

Name of field in form @param int $showempty Add an empty field @return string HTML select string

$showempty

selectLdapServerProtocolVersion($selected = '3', string $htmlname = 'ldapprotocolversion', $showempty = 0)

Return list of ldap server protocol version

@param string $selected Preselected type

Parameters

$selected
string $htmlname

Name of field in form @param int $showempty Add an empty field @return string HTML select string

$showempty