1 | <?php |
||
7 | class Button extends BaseElement { |
||
8 | |||
9 | /** |
||
10 | * just a button |
||
11 | */ |
||
12 | const TYPE_BUTTON = 'button'; |
||
13 | |||
14 | /** |
||
15 | * reset value from each element in form |
||
16 | */ |
||
17 | const TYPE_RESET = 'reset'; |
||
18 | |||
19 | /** |
||
20 | * Submit form |
||
21 | */ |
||
22 | const TYPE_SUBMIT = 'submit'; |
||
23 | |||
24 | protected $isSubmitted = false; |
||
25 | |||
26 | protected $attributes = [ |
||
27 | 'type' => self::TYPE_BUTTON, |
||
28 | ]; |
||
29 | |||
30 | |||
31 | /** |
||
32 | * @return $this |
||
33 | */ |
||
34 | public function handle(FormData $request) { |
||
38 | |||
39 | |||
40 | public function isSubmitted() : bool { |
||
46 | |||
47 | |||
48 | public function setType(string $type) : self { |
||
56 | |||
57 | |||
58 | /** |
||
59 | * @return string |
||
60 | */ |
||
61 | public function render() { |
||
68 | |||
69 | } |