1 | <?php |
||
30 | class FormViewHelperService implements SingletonInterface |
||
31 | { |
||
32 | /** |
||
33 | * @var bool |
||
34 | */ |
||
35 | protected $formContext = false; |
||
36 | |||
37 | /** |
||
38 | * @var FormObject |
||
39 | */ |
||
40 | protected $formObject; |
||
41 | |||
42 | /** |
||
43 | * Reset every state that can be used by this service. |
||
44 | */ |
||
45 | public function resetState() |
||
50 | |||
51 | /** |
||
52 | * Will activate the form context, changing the result returned by the |
||
53 | * function `formContextExists()`. |
||
54 | * |
||
55 | * @return FormViewHelperService |
||
56 | * @throws DuplicateEntryException |
||
57 | */ |
||
58 | public function activateFormContext() |
||
68 | |||
69 | /** |
||
70 | * Will loop on the submitted form fields and apply behaviours if their |
||
71 | * configuration contains. |
||
72 | * |
||
73 | * @param ControllerContext $controllerContext |
||
74 | */ |
||
75 | public function applyBehavioursOnSubmittedForm(ControllerContext $controllerContext) |
||
99 | |||
100 | /** |
||
101 | * Returns `true` if the `FormViewHelper` context exists. |
||
102 | * |
||
103 | * @return bool |
||
104 | */ |
||
105 | public function formContextExists() |
||
109 | |||
110 | /** |
||
111 | * @return FormObject |
||
112 | */ |
||
113 | public function getFormObject() |
||
117 | |||
118 | /** |
||
119 | * @param FormObject $formObject |
||
120 | */ |
||
121 | public function setFormObject(FormObject $formObject) |
||
125 | } |
||
126 |