1 | <?php |
||
23 | class FieldViewHelperService implements SingletonInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var Field |
||
27 | */ |
||
28 | protected $currentField; |
||
29 | |||
30 | /** |
||
31 | * @var array |
||
32 | */ |
||
33 | protected $fieldOptions = []; |
||
34 | |||
35 | /** |
||
36 | * Reset every state that can be used by this service. |
||
37 | */ |
||
38 | public function resetState() |
||
43 | |||
44 | /** |
||
45 | * Checks that the `FieldViewHelper` has been called. If not, an exception |
||
46 | * is thrown. |
||
47 | * |
||
48 | * @return bool |
||
49 | */ |
||
50 | public function fieldContextExists() |
||
54 | |||
55 | /** |
||
56 | * Returns the current field which was defined by the `FieldViewHelper`. |
||
57 | * |
||
58 | * Returns null if no current field was found. |
||
59 | * |
||
60 | * @return Field|null |
||
61 | */ |
||
62 | public function getCurrentField() |
||
66 | |||
67 | /** |
||
68 | * @param Field $field |
||
69 | */ |
||
70 | public function setCurrentField(Field $field) |
||
74 | |||
75 | /** |
||
76 | * @param string $name |
||
77 | * @param mixed $value |
||
78 | */ |
||
79 | public function setFieldOption($name, $value) |
||
83 | |||
84 | /** |
||
85 | * @return array |
||
86 | */ |
||
87 | public function getFieldOptions() |
||
91 | } |
||
92 |