Completed
Push — master ( 25a367...4e273e )
by Adrian
03:50
created

Specs::get()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
ccs 5
cts 5
cp 1
rs 9.6667
cc 3
eloc 5
nc 3
nop 1
crap 3
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