| 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 | * Array of actions. |
||
| 32 | * |
||
| 33 | * @var array |
||
| 34 | */ |
||
| 35 | protected $successActions; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Generates a wrapper for a given form. |
||
| 39 | * |
||
| 40 | * @param string $formClass Fqcn of form |
||
| 41 | * @param Action[] $successActions Array of actions |
||
| 42 | */ |
||
| 43 | public function __construct($formClass, $successActions = []) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Returns a new instance of the Form. |
||
| 58 | * |
||
| 59 | * @return \Symfony\Component\Form\Form |
||
| 60 | */ |
||
| 61 | public function getForm() |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Returns registered actions to be called in form success. |
||
| 68 | * |
||
| 69 | * @return Action[] |
||
| 70 | */ |
||
| 71 | public function getSuccessActions() |
||
| 75 | } |
||
| 76 |