1 | <?php |
||
21 | class FormWrapper |
||
22 | { |
||
23 | /** |
||
24 | * The fully qualified class name of form. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $formClass; |
||
29 | |||
30 | /** |
||
31 | * The name of the form. |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $name; |
||
36 | |||
37 | /** |
||
38 | * Array of actions. |
||
39 | * |
||
40 | * @var array |
||
41 | */ |
||
42 | protected $successActions; |
||
43 | |||
44 | /** |
||
45 | * Generates a wrapper for a given form. |
||
46 | * |
||
47 | * @param string $name The name of form |
||
48 | * @param string $formClass Fqcn of form |
||
49 | * @param Action[] $successActions Array of actions |
||
50 | */ |
||
51 | public function __construct($name, $formClass, $successActions = []) |
||
64 | |||
65 | /** |
||
66 | * Gets the fully qualified class name of the form. |
||
67 | * |
||
68 | * @return string |
||
69 | */ |
||
70 | public function getForm() |
||
74 | |||
75 | /** |
||
76 | * Gets name of the form. |
||
77 | * |
||
78 | * @return string |
||
79 | */ |
||
80 | public function getName() |
||
84 | |||
85 | /** |
||
86 | * Returns registered actions to be called in form success. |
||
87 | * |
||
88 | * @return Action[] |
||
89 | */ |
||
90 | public function getSuccessActions() |
||
94 | } |
||
95 |