1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Del\Form\Field; |
||
6 | |||
7 | class Submit extends FieldAbstract |
||
8 | { |
||
9 | |||
10 | 6 | public function getTag(): string |
|
11 | { |
||
12 | 6 | return 'input'; |
|
13 | } |
||
14 | |||
15 | 10 | public function init() |
|
16 | { |
||
17 | 10 | $this->setAttribute('type', 'submit'); |
|
18 | } |
||
19 | |||
20 | /** |
||
21 | * Submit constructor. |
||
22 | * @param $name |
||
23 | * @param null $value |
||
0 ignored issues
–
show
Documentation
Bug
introduced
by
![]() |
|||
24 | */ |
||
25 | 10 | public function __construct(string $name, string $value = null) |
|
26 | { |
||
27 | 10 | $value = is_null($value) ? $name : $value; |
|
28 | 10 | parent::__construct($name, $value); |
|
29 | 10 | $this->setClass('btn btn-primary'); |
|
30 | } |
||
31 | } |
||
32 |