Completed
Push — master ( 670c0a...062b68 )
by Terzi
04:34
created

Radio::onView()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Terranet\Administrator\Field;
4
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()
53
    {
54
        return $this->onIndex();
55
    }
56
}