Révision bc175c27
Ajouté par Assos Assos il y a plus de 5 ans
drupal7/sites/all/modules/ldap/ldap_help/ldap_help.examples.inc | ||
---|---|---|
18 | 18 |
drupal_add_library('system', 'drupal.collapse'); |
19 | 19 |
$sample_ldaps = array( |
20 | 20 |
'activedirectory' => 'activedirectory1', |
21 |
'openldap' => 'openldap1',
|
|
21 |
'openldap' => 'openldap1', |
|
22 | 22 |
); |
23 | 23 |
|
24 | 24 |
|
25 | 25 |
$form = array(); |
26 |
foreach ($sample_ldaps as $ldap_type => $sample_ldap_id) {
|
|
26 |
foreach ($sample_ldaps as $ldap_type => $sample_ldap_id) { |
|
27 | 27 |
|
28 | 28 |
$sample_ldap_id = $sample_ldaps[$ldap_type]; |
29 | 29 |
$test_functions->populateFakeLdapServerData(LDAP_TEST_LDAP_NAME, $sample_ldap_id); |
30 | 30 |
$data = $test_functions->data['ldap_servers'][$sample_ldap_id]['ldap']; |
31 |
$form[$sample_ldap_id] = array(
|
|
31 |
$form[$sample_ldap_id] = array( |
|
32 | 32 |
'#type' => 'fieldset', |
33 | 33 |
'#title' => $ldap_type, |
34 | 34 |
'#description' => '', |
... | ... | |
37 | 37 |
'#collapsed' => TRUE, |
38 | 38 |
); |
39 | 39 |
foreach (array('people', 'groups') as $ou) { |
40 |
$form[$sample_ldap_id][$ou] = array(
|
|
40 |
$form[$sample_ldap_id][$ou] = array( |
|
41 | 41 |
'#type' => 'fieldset', |
42 | 42 |
'#title' => "ou=$ou", |
43 | 43 |
'#description' => '', |
... | ... | |
62 | 62 |
$li[] = theme('item_list', array('items' => $values , 'type' => 'ul', 'title' => $attr)); |
63 | 63 |
} |
64 | 64 |
} |
65 |
$form[$sample_ldap_id][$ou][$dn] = array(
|
|
65 |
$form[$sample_ldap_id][$ou][$dn] = array( |
|
66 | 66 |
'#type' => 'fieldset', |
67 | 67 |
'#attributes' => array('class' => array('collapsible', 'collapsed')), |
68 | 68 |
'#title' => $dn, |
69 | 69 |
'#collapsible' => TRUE, |
70 | 70 |
'#collapsed' => TRUE, |
71 | 71 |
); |
72 |
$form[$sample_ldap_id][$ou][$dn][] = array(
|
|
72 |
$form[$sample_ldap_id][$ou][$dn][] = array( |
|
73 | 73 |
'#markup' => theme('item_list', array('items' => $li , 'type' => 'ul', 'title' => '')), |
74 | 74 |
); |
75 | 75 |
|
Formats disponibles : Unified diff
Weekly update of contrib modules