Completed
Push — master ( cc0b93...2d7ca6 )
by wen
12:33
created

Tinymce::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Sco\Admin\Form\Elements;
4
5
class Tinymce extends NamedElement
6
{
7
    protected $type = 'tinymce';
8
9
    protected $size;
10
11
    protected $options;
12
13
    /**
14
     * @return mixed
15
     */
16
    public function getSize()
17
    {
18
        return $this->size;
19
    }
20
21
    /**
22
     * @param mixed $size
23
     *
24
     * @return Tinymce
25
     */
26
    public function setSize($size)
27
    {
28
        $this->size = $size;
29
30
        return $this;
31
    }
32
33
    /**
34
     * @return mixed
35
     */
36
    public function getOptions()
37
    {
38
        return $this->options;
39
    }
40
41
    /**
42
     * @param mixed $options
43
     *
44
     * @return Tinymce
45
     */
46
    public function setOptions($options)
47
    {
48
        $this->options = $options;
49
50
        return $this;
51
    }
52
53
    public function toArray()
54
    {
55
        return parent::toArray() + [
56
                'size'    => $this->getSize(),
57
                'options' => $this->getOptions(),
58
            ];
59
    }
60
}
61