Conditions | 1 |
Paths | 1 |
Total Lines | 39 |
Code Lines | 25 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
17 | public function __construct(DIInterface $di) |
||
18 | { |
||
19 | parent::__construct($di); |
||
20 | $this->form->create( |
||
21 | [ |
||
22 | "id" => __CLASS__, |
||
23 | "legend" => "Legend", |
||
24 | ], |
||
25 | [ |
||
26 | "num1" => [ |
||
27 | "type" =>"text", |
||
28 | "label" => "Numeric (as input type=text)", |
||
29 | "validation" => ["number"], |
||
30 | ], |
||
31 | |||
32 | "num2" => [ |
||
33 | "type" =>"number", |
||
34 | "label" => "Numeric (as input type=number)", |
||
35 | "validation" => ["number"], |
||
36 | ], |
||
37 | |||
38 | "num3" => [ |
||
39 | "type" =>"range", |
||
40 | "label" => "Numeric (as input type=range)", |
||
41 | "validation" => ["number"], |
||
42 | "value" => 42, |
||
43 | "min" => 0, |
||
44 | "max" => 100, |
||
45 | "step" => 2, |
||
46 | ], |
||
47 | |||
48 | "submit" => [ |
||
49 | "type" => "submit", |
||
50 | "value" => "Submit", |
||
51 | "callback" => [$this, "callbackSubmit"] |
||
52 | ], |
||
53 | ] |
||
54 | ); |
||
55 | } |
||
56 | |||
75 |