| 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 | /** | ||
| 36 | * @return bool | ||
| 37 | */ | ||
| 38 | 2 |     public function isSubmitted() { | |
| 44 | |||
| 45 | |||
| 46 | /** | ||
| 47 | * @param string $type | ||
| 48 | * @return $this | ||
| 49 | */ | ||
| 50 | 4 |     public function setType($type) { | |
| 62 | |||
| 63 | |||
| 64 | /** | ||
| 65 | * @return string | ||
| 66 | */ | ||
| 67 | 1 |     public function render() { | |
| 74 | |||
| 75 | } |