File: demoSection.php

package info (click to toggle)
fusiondirectory 1.0.8.2-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 28,984 kB
  • sloc: php: 74,645; xml: 3,645; perl: 1,555; pascal: 705; sh: 135; sql: 45; makefile: 19
file content (118 lines) | stat: -rw-r--r-- 3,443 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
      'demo' => array(
        'name'  => _('Demo'),
        'attrs' => array(
          new StringAttribute (
            _('StringAttribute'),             // Label
            _('This is a string attribute'),  // Description
            'fakeString',                     // LDAP name
            FALSE,                             // Mandatory
            'example value'                   // Default value
          ),
          new PasswordAttribute (
            _('PasswordAttribute'),
            _('This is a password attribute'),
            'fakePassword',
            FALSE,
            'example value'
          ),
          new IntAttribute (
            _('IntAttribute'),
            _('This is an int attribute'),
            'fakeInt',
            FALSE,
            0,
            1337,
            42
          ),
          new FloatAttribute (
            _('FloatAttribute'),
            _('This is an float attribute'),
            'fakeFloat',
            FALSE,
            0.0,
            1337.0,
            13.37
          ),
          new SelectAttribute (
            _('SelectAttribute'),
            _('This is a select attribute'),
            'fakeSelect',
            FALSE,
            array('choice1', 'choice2'),
            'choice1',
            array('Choice 1', 'Choice 2')
          ),
          new BooleanAttribute (
            _('BooleanAttribute'),
            _('This is a boolean attribute'),
            'fakeBoolean',
            FALSE,
            FALSE
          ),
          new FileAttribute (
            _('FileAttribute'),
            _('This is a file attribute'),
            'fakeFile',
            FALSE
          ),
          new DateAttribute (
            _('DateAttribute'),
            _('This is a date attribute'),
            'fakeDate',
            FALSE,
            'd.m.Y'
          ),
          new BaseSelectorAttribute (
            'ou=fake'
          ),
          new SetAttribute (
            new StringAttribute (
              _('SetAttribute'),
              _('This is a set attribute of strings'),
              'fakeSet',
              FALSE
            ),
            array(
              'example value1',
              'example value2',
            )
          ),
          new OrderedArrayAttribute (
            new CompositeAttribute (
              _('This is an OrderedArrayAttribute of composite attributes'),
              'fakeComposite',
              array(
                new StringAttribute (
                  _('StringAttribute'),
                  _('This is a set attribute of strings'),
                  'fakeCompositeString',
                  FALSE
                ),
                new SelectAttribute (
                  _('SelectAttribute'),
                  _('This is a select attribute'),
                  'fakeCompositeSelect',
                  TRUE,
                  array('choice1', 'choice2'),
                  'choice1',
                  array('Choice 1', 'Choice 2')
                )
              ),
              '/^(.+):(.+)$/',
              '%s:%s'
            ),
            TRUE,
            array(
              'value1:choice1',
              'value1:choice2',
              'value2:choice1'
            )
          ),
          new UsersAttribute (
            _('UsersAttribute'),
            _('This is a users attribute'),
            'fakeUsers',
            FALSE
          ),
        )
      ),