|
1
|
|
|
<?php |
|
2
|
|
|
namespace Sirius\Input; |
|
3
|
|
|
|
|
4
|
|
|
|
|
5
|
|
|
class Specs |
|
6
|
|
|
{ |
|
7
|
|
|
/** |
|
8
|
|
|
* Extra options for the input element |
|
9
|
|
|
*/ |
|
10
|
|
|
const DATA = 'data'; |
|
11
|
|
|
|
|
12
|
|
|
/** |
|
13
|
|
|
* Info used by the view layer to render the widget's input field section (eg: HTML attributes) |
|
14
|
|
|
*/ |
|
15
|
|
|
const ATTRIBUTES = 'attributes'; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* The text of the input's label |
|
19
|
|
|
*/ |
|
20
|
|
|
const LABEL = 'label'; |
|
21
|
|
|
|
|
22
|
|
|
/** |
|
23
|
|
|
* Info used by the view layer to render the widget's label section (eg: HTML attributes) |
|
24
|
|
|
*/ |
|
25
|
|
|
const LABEL_ATTRIBUTES = 'label_attributes'; |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* The display order of the element inside it's container (form, group, fieldset) |
|
29
|
|
|
*/ |
|
30
|
|
|
const POSITION = 'position'; |
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* The name of the element which visually includes the current element |
|
34
|
|
|
*/ |
|
35
|
|
|
const GROUP = 'group'; |
|
36
|
|
|
|
|
37
|
|
|
/** |
|
38
|
|
|
* Info used by the view layer to render the widget (eg: HTML attributes) |
|
39
|
|
|
*/ |
|
40
|
|
|
const CONTAINER_ATTRIBUTES = 'container_attributes'; |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* Instructions about filling out the input |
|
44
|
|
|
*/ |
|
45
|
|
|
const HINT = 'hint'; |
|
46
|
|
|
|
|
47
|
|
|
/** |
|
48
|
|
|
* Info used by the view layer to render the widget's hint section (eg: HTML attributes) |
|
49
|
|
|
*/ |
|
50
|
|
|
const HINT_ATTRIBUTES = 'hint_attributes'; |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* The validation rules used to verify the validity of a value |
|
54
|
|
|
*/ |
|
55
|
|
|
const VALIDATION = 'validation_rules'; |
|
56
|
|
|
const VALIDATION_RULES = 'validation_rules'; |
|
57
|
|
|
|
|
58
|
|
|
/** |
|
59
|
|
|
* The list of filter rules to be applied to the value |
|
60
|
|
|
*/ |
|
61
|
|
|
const FILTERS = 'filters'; |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* The type of UI element |
|
65
|
|
|
*/ |
|
66
|
|
|
const WIDGET = 'widget'; |
|
67
|
|
|
|
|
68
|
|
|
/** |
|
69
|
|
|
* The type of Input element to be constructed |
|
70
|
|
|
*/ |
|
71
|
|
|
const ELEMENT_TYPE = 'type'; |
|
72
|
|
|
const TYPE = 'type'; |
|
73
|
|
|
|
|
74
|
|
|
/** |
|
75
|
|
|
* The list of acceptable choices for "select" type of elements |
|
76
|
|
|
*/ |
|
77
|
|
|
const OPTIONS = 'options'; |
|
78
|
|
|
|
|
79
|
|
|
/** |
|
80
|
|
|
* The first option (the label for NULL) for "select" type of elements |
|
81
|
|
|
*/ |
|
82
|
|
|
const FIRST_OPTION = 'first_option'; |
|
83
|
|
|
|
|
84
|
|
|
/** |
|
85
|
|
|
* The value to be sent by the client when a "checkbox" is not checked |
|
86
|
|
|
*/ |
|
87
|
|
|
const UNCHECKED_VALUE = 'unchecked_value'; |
|
88
|
|
|
|
|
89
|
|
|
/** |
|
90
|
|
|
* The value to be sent by the client when a "checkbox" is checked |
|
91
|
|
|
*/ |
|
92
|
|
|
const CHECKED_VALUE = 'checked_value'; |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* The container for the uploaded files (@see \Sirius\Upload\Handler) |
|
96
|
|
|
*/ |
|
97
|
|
|
const UPLOAD_CONTAINER = 'upload_container'; |
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* The upload options (@see \Sirius\Upload\Handler) |
|
101
|
|
|
*/ |
|
102
|
|
|
const UPLOAD_OPTIONS = 'upload_options'; |
|
103
|
|
|
|
|
104
|
|
|
/** |
|
105
|
|
|
* The validation rules for the uploaded files (@see \Sirius\Upload\Handler) |
|
106
|
|
|
*/ |
|
107
|
|
|
const UPLOAD_RULES = 'upload_rules'; |
|
108
|
|
|
|
|
109
|
|
|
/** |
|
110
|
|
|
* The children for FORMs or FIELDSETs |
|
111
|
|
|
*/ |
|
112
|
|
|
const CHILDREN = 'children'; |
|
113
|
|
|
|
|
114
|
|
|
} |
|
115
|
|
|
|