| Total Complexity | 5 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Radio extends Generic |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var array |
||
| 9 | */ |
||
| 10 | protected $options = []; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @return array |
||
| 14 | */ |
||
| 15 | public function getOptions(): array |
||
| 16 | { |
||
| 17 | return (array) $this->options; |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param array $options |
||
| 22 | * @return self |
||
| 23 | */ |
||
| 24 | public function setOptions(array $options): self |
||
| 25 | { |
||
| 26 | $this->options = $options; |
||
| 27 | |||
| 28 | return $this; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return array |
||
| 33 | */ |
||
| 34 | public function onIndex() |
||
| 35 | { |
||
| 36 | return [ |
||
| 37 | 'options' => $this->getOptions(), |
||
| 38 | ]; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return array |
||
| 43 | */ |
||
| 44 | public function onView() |
||
| 45 | { |
||
| 46 | return $this->onIndex(); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return array |
||
| 51 | */ |
||
| 52 | public function onEdit() |
||
| 55 | } |
||
| 56 | } |