1 | <?php |
||
17 | class AbstractField |
||
18 | { |
||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | private $fieldName; |
||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $exposedName; |
||
27 | /** |
||
28 | * @var bool |
||
29 | */ |
||
30 | private $readOnly; |
||
31 | /** |
||
32 | * @var bool |
||
33 | */ |
||
34 | private $required; |
||
35 | /** |
||
36 | * @var bool |
||
37 | */ |
||
38 | private $searchable; |
||
39 | |||
40 | /** |
||
41 | * Constructor |
||
42 | * |
||
43 | * @param string $fieldName Field name |
||
44 | * @param string $exposedName Exposed name |
||
45 | * @param bool $readOnly Read only |
||
46 | * @param bool $required Is required |
||
47 | */ |
||
48 | public function __construct($fieldName, $exposedName, $readOnly, $required) |
||
55 | |||
56 | /** |
||
57 | * Get field name |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getFieldName() |
||
65 | |||
66 | /** |
||
67 | * Get exposed name |
||
68 | * |
||
69 | * @return string |
||
70 | */ |
||
71 | public function getExposedName() |
||
75 | |||
76 | /** |
||
77 | * Is read only |
||
78 | * |
||
79 | * @return bool |
||
80 | */ |
||
81 | public function isReadOnly() |
||
85 | |||
86 | /** |
||
87 | * Is required |
||
88 | * |
||
89 | * @return bool |
||
90 | */ |
||
91 | public function isRequired() |
||
95 | |||
96 | /** |
||
97 | * Is searchable |
||
98 | * |
||
99 | * @return bool |
||
100 | */ |
||
101 | public function isSearchable() |
||
105 | |||
106 | /** |
||
107 | * Get form name |
||
108 | * |
||
109 | * @return string |
||
110 | */ |
||
111 | public function getFormName() |
||
123 | } |
||
124 |