1 | <?php |
||
22 | class FieldDescriptor implements FieldDescriptorInterface |
||
23 | { |
||
24 | /** |
||
25 | * The name of the field in the database. |
||
26 | * |
||
27 | * @var string |
||
28 | * @Expose |
||
29 | */ |
||
30 | private $name; |
||
31 | |||
32 | /** |
||
33 | * The translation name. |
||
34 | * |
||
35 | * @var string |
||
36 | * @Expose |
||
37 | */ |
||
38 | private $translation; |
||
39 | |||
40 | /** |
||
41 | * Defines whether the field is disabled or not. |
||
42 | * |
||
43 | * @var bool |
||
44 | * @Expose |
||
45 | */ |
||
46 | private $disabled; |
||
47 | |||
48 | /** |
||
49 | * Defines whether the field is hideable or not. |
||
50 | * |
||
51 | * @var bool |
||
52 | * @Expose |
||
53 | */ |
||
54 | private $default; |
||
55 | |||
56 | /** |
||
57 | * Defines if this field is sortable. |
||
58 | * |
||
59 | * @var bool |
||
60 | * @Expose |
||
61 | */ |
||
62 | private $sortable; |
||
63 | |||
64 | /** |
||
65 | * The type of the field (only used for special fields like dates). |
||
66 | * |
||
67 | * @var string |
||
68 | * @Expose |
||
69 | */ |
||
70 | private $type; |
||
71 | |||
72 | /** |
||
73 | * The width of the field in a table. |
||
74 | * |
||
75 | * @var string |
||
76 | * @Expose |
||
77 | */ |
||
78 | private $width; |
||
79 | |||
80 | /** |
||
81 | * The minimal with of the field in the table. |
||
82 | * |
||
83 | * @var string |
||
84 | * @Expose |
||
85 | */ |
||
86 | private $minWidth; |
||
87 | |||
88 | /** |
||
89 | * Defines whether the field is editable in the table or not. |
||
90 | * |
||
91 | * @var bool |
||
92 | * @Expose |
||
93 | */ |
||
94 | private $editable; |
||
95 | |||
96 | /** |
||
97 | * The css class of the column. |
||
98 | * |
||
99 | * @var string |
||
100 | * @Expose |
||
101 | */ |
||
102 | private $class; |
||
103 | |||
104 | /** |
||
105 | * @var PropertyMetadata |
||
106 | * @Exclude |
||
107 | */ |
||
108 | private $metadata; |
||
109 | |||
110 | public function __construct( |
||
133 | |||
134 | /** |
||
135 | * {@inheritdoc} |
||
136 | */ |
||
137 | public function getName() |
||
141 | |||
142 | /** |
||
143 | * {@inheritdoc} |
||
144 | */ |
||
145 | public function getDisabled() |
||
149 | |||
150 | /** |
||
151 | * {@inheritdoc} |
||
152 | */ |
||
153 | public function getTranslation() |
||
157 | |||
158 | /** |
||
159 | * {@inheritdoc} |
||
160 | */ |
||
161 | public function getType() |
||
165 | |||
166 | /** |
||
167 | * {@inheritdoc} |
||
168 | */ |
||
169 | public function getWidth() |
||
173 | |||
174 | /** |
||
175 | * {@inheritdoc} |
||
176 | */ |
||
177 | public function getDefault() |
||
181 | |||
182 | /** |
||
183 | * {@inheritdoc} |
||
184 | */ |
||
185 | public function getSortable() |
||
189 | |||
190 | /** |
||
191 | * {@inheritdoc} |
||
192 | */ |
||
193 | public function getEditable() |
||
197 | |||
198 | /** |
||
199 | * {@inheritdoc} |
||
200 | */ |
||
201 | public function getMinWidth() |
||
205 | |||
206 | /** |
||
207 | * {@inheritdoc} |
||
208 | */ |
||
209 | public function getClass() |
||
213 | |||
214 | /** |
||
215 | * {@inheritdoc} |
||
216 | */ |
||
217 | public function getMetadata() |
||
221 | |||
222 | /** |
||
223 | * Sets metadata for property. |
||
224 | * |
||
225 | * @param PropertyMetadata $metadata |
||
226 | */ |
||
227 | public function setMetadata($metadata) |
||
231 | |||
232 | /** |
||
233 | * {@inheritdoc} |
||
234 | */ |
||
235 | public function compare(FieldDescriptorInterface $other) |
||
244 | } |
||
245 |