| 1 | <?php |
||
| 7 | class Button extends BaseElement { |
||
| 8 | |||
| 9 | // just a button |
||
| 10 | const TYPE_BUTTON = 'button'; |
||
| 11 | |||
| 12 | // reset value from each element in form |
||
| 13 | const TYPE_RESET = 'reset'; |
||
| 14 | |||
| 15 | // submit form |
||
| 16 | const TYPE_SUBMIT = 'submit'; |
||
| 17 | |||
| 18 | protected $isSubmitted = false; |
||
| 19 | |||
| 20 | |||
| 21 | 4 | public function __construct() { |
|
| 24 | |||
| 25 | |||
| 26 | /** |
||
| 27 | * @return $this |
||
| 28 | */ |
||
| 29 | 2 | public function handle(FormData $request) { |
|
| 33 | |||
| 34 | |||
| 35 | 2 | public function isSubmitted() { |
|
| 41 | |||
| 42 | |||
| 43 | 4 | public function setType(string $type) { |
|
| 54 | |||
| 55 | |||
| 56 | 1 | public function render() : string { |
|
| 63 | |||
| 64 | } |