1 | <?php |
||
27 | class FormzViewHelperService implements SingletonInterface |
||
28 | { |
||
29 | |||
30 | /** |
||
31 | * @var FormzViewHelperService |
||
32 | */ |
||
33 | protected static $instance; |
||
34 | |||
35 | /** |
||
36 | * @return FormzViewHelperService |
||
37 | */ |
||
38 | public static function get() |
||
46 | |||
47 | /** |
||
48 | * Returns `true` if the `FormViewHelper` context exists. |
||
49 | * |
||
50 | * @return bool |
||
51 | */ |
||
52 | public function formContextExists() |
||
56 | |||
57 | /** |
||
58 | * Returns `true` if the form was submitted by the user. |
||
59 | * |
||
60 | * @return bool |
||
61 | */ |
||
62 | public function formWasSubmitted() |
||
66 | |||
67 | /** |
||
68 | * Checks that the `FieldViewHelper` has been called. If not, an exception |
||
69 | * is thrown. |
||
70 | * |
||
71 | * @param RenderingContextInterface $renderingContext |
||
72 | * @return bool |
||
73 | */ |
||
74 | public function fieldContextExists(RenderingContextInterface $renderingContext) |
||
78 | |||
79 | /** |
||
80 | * Returns the current field which was defined by the `FieldViewHelper`. |
||
81 | * |
||
82 | * Returns null if no current field was found. |
||
83 | * |
||
84 | * @param RenderingContextInterface $renderingContext |
||
85 | * @return Field|null |
||
86 | */ |
||
87 | public function getCurrentField(RenderingContextInterface $renderingContext) |
||
102 | } |
||
103 |