| 1 | <?php | ||
| 13 | class Former implements Contract | ||
| 14 | { | ||
| 15 | /** | ||
| 16 | * The FormerHelper instance. | ||
| 17 | * | ||
| 18 | * @var HelperContract | ||
| 19 | */ | ||
| 20 | private $helper; | ||
| 21 | |||
| 22 | /** | ||
| 23 | * FormFactory constructor. | ||
| 24 | * | ||
| 25 | * @param HelperContract $helper | ||
| 26 | */ | ||
| 27 | public function __construct(HelperContract $helper) | ||
| 31 | |||
| 32 | /** | ||
| 33 | * Make a form instance by using the rules. | ||
| 34 | * | ||
| 35 | * @param array $formRules | ||
| 36 | * @param Model|null $model | ||
| 37 | * @param null $theme | ||
| 38 | * @return Form | ||
| 39 | */ | ||
| 40 | public function make(array $formRules, Model $model = null, $theme = null) | ||
| 64 | |||
| 65 | /** | ||
| 66 | * Make a form instance by using the form request. | ||
| 67 | * | ||
| 68 | * @param $formRequest | ||
| 69 | * @param Model $model | ||
| 70 | * @param string|null $theme | ||
| 71 | * @return void | ||
| 72 | */ | ||
| 73 | public function makeFromRequest($formRequest, Model $model, $theme = null) | ||
| 77 | } |