1 | <?php |
||
25 | class FieldViewHelperService implements SingletonInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var Field |
||
29 | */ |
||
30 | protected $currentField; |
||
31 | |||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | protected $fieldOptions = []; |
||
36 | |||
37 | /** |
||
38 | * @var StandaloneView |
||
39 | */ |
||
40 | protected $view; |
||
41 | |||
42 | /** |
||
43 | * Reset every state that can be used by this service. |
||
44 | */ |
||
45 | public function resetState() |
||
50 | |||
51 | /** |
||
52 | * Checks that the `FieldViewHelper` has been called. If not, an exception |
||
53 | * is thrown. |
||
54 | * |
||
55 | * @return bool |
||
56 | */ |
||
57 | public function fieldContextExists() |
||
61 | |||
62 | /** |
||
63 | * Returns the current field which was defined by the `FieldViewHelper`. |
||
64 | * |
||
65 | * Returns null if no current field was found. |
||
66 | * |
||
67 | * @return Field|null |
||
68 | */ |
||
69 | public function getCurrentField() |
||
73 | |||
74 | /** |
||
75 | * @param Field $field |
||
76 | */ |
||
77 | public function setCurrentField(Field $field) |
||
81 | |||
82 | /** |
||
83 | * @param string $name |
||
84 | * @param mixed $value |
||
85 | */ |
||
86 | public function setFieldOption($name, $value) |
||
90 | |||
91 | /** |
||
92 | * @return array |
||
93 | */ |
||
94 | public function getFieldOptions() |
||
98 | |||
99 | /** |
||
100 | * @return StandaloneView |
||
101 | */ |
||
102 | public function getView() |
||
110 | } |
||
111 |