| Conditions | 1 |
| Paths | 1 |
| Total Lines | 43 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function init(): void |
||
| 18 | { |
||
| 19 | $name = new Text('name'); |
||
| 20 | $name->setLabel('Name of Unicorn'); |
||
| 21 | $name->setRequired(true); |
||
| 22 | $this->addField($name); |
||
| 23 | |||
| 24 | $dob = new Text('dob'); |
||
| 25 | $dob->setClass('form-control datepicker'); |
||
| 26 | $dob->setLabel('Date of Birth'); |
||
| 27 | $this->addField($dob); |
||
| 28 | |||
| 29 | $food = new Select('food'); |
||
| 30 | $food->setOptions([ |
||
| 31 | 1 => 'Beef', |
||
| 32 | 2 => 'Chicken', |
||
| 33 | 3 => 'Pork', |
||
| 34 | 4 => 'Marshmallows', |
||
| 35 | ]); |
||
| 36 | $food->setLabel('Favourite Food'); |
||
| 37 | $this->addField($food); |
||
| 38 | |||
| 39 | $canFly = new CheckBox('canFly'); |
||
| 40 | $canFly->setOptions([ |
||
| 41 | 1 => 'qwer', |
||
| 42 | 2 => 'jgf', |
||
| 43 | ]); |
||
| 44 | $canFly->setLabel('Can Fly'); |
||
| 45 | $canFly->setRequired(true); |
||
| 46 | $this->addField($canFly); |
||
| 47 | |||
| 48 | $drink = new Radio('drink'); |
||
| 49 | $drink->setOptions([ |
||
| 50 | 1 => 'Pepsi', |
||
| 51 | 2 => 'Coke', |
||
| 52 | 3 => 'Beer', |
||
| 53 | ]); |
||
| 54 | $drink->setLabel('Favourite Drink'); |
||
| 55 | $this->addField($drink); |
||
| 56 | |||
| 57 | $submit = new Submit('submit'); |
||
| 58 | $this->addField($submit); |
||
| 59 | } |
||
| 60 | } |
||
| 61 |