Completed
Push — master ( 979638...bdcf8d )
by WEBEWEB
01:25
created

AbstractButton::getBlock()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the bootstrap-bundle package.
5
 *
6
 * (c) 2019 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\BootstrapBundle\Button;
13
14
/**
15
 * Abstract button.
16
 *
17
 * @author webeweb <https://github.com/webeweb/>
18
 * @package WBW\Bundle\BootstrapBundle\Button
19
 * @abstract
20
 */
21
abstract class AbstractButton implements ButtonInterface {
22
23
    /**
24
     * Active
25
     *
26
     * @var bool
27
     */
28
    private $active;
29
30
    /**
31
     * Block.
32
     *
33
     * @var bool
34
     */
35
    private $block;
36
37
    /**
38
     * Content.
39
     *
40
     * @var string
41
     */
42
    private $content;
43
44
    /**
45
     * Disabled.
46
     *
47
     * @var bool
48
     */
49
    private $disabled;
50
51
    /**
52
     * Size.
53
     *
54
     * @var string
55
     */
56
    private $size;
57
58
    /**
59
     * Title.
60
     *
61
     * @var string
62
     */
63
    private $title;
64
65
    /**
66
     * Type.
67
     *
68
     * @var string
69
     */
70
    private $type;
71
72
    /**
73
     * Constructor.
74
     *
75
     * @param string type.
76
     */
77
    protected function __construct($type) {
78
        $this->setActive(false);
79
        $this->setBlock(false);
80
        $this->setDisabled(false);
81
        $this->setType($type);
82
    }
83
84
    /**
85
     * {@inheritdoc}
86
     */
87
    public function getActive() {
88
        return $this->active;
89
    }
90
91
    /**
92
     * {@inheritdoc}
93
     */
94
    public function getBlock() {
95
        return $this->block;
96
    }
97
98
    /**
99
     * {@inheritdoc}
100
     */
101
    public function getContent() {
102
        return $this->content;
103
    }
104
105
    /**
106
     * {@inheritdoc}
107
     */
108
    public function getDisabled() {
109
        return $this->disabled;
110
    }
111
112
    /**
113
     * {@inheritdoc}
114
     */
115
    public function getSize() {
116
        return $this->size;
117
    }
118
119
    /**
120
     * {@inheritdoc}
121
     */
122
    public function getTitle() {
123
        return $this->title;
124
    }
125
126
    /**
127
     * {@inheritdoc}
128
     */
129
    public function getType() {
130
        return $this->type;
131
    }
132
133
    /**
134
     * {@inheritdoc}
135
     */
136
    public function setActive($active) {
137
        $this->active = $active;
138
        return $this;
139
    }
140
141
    /**
142
     * {@inheritdoc}
143
     */
144
    public function setBlock($block) {
145
        $this->block = $block;
146
        return $this;
147
    }
148
149
    /**
150
     * {@inheritdoc}
151
     */
152
    public function setContent($content) {
153
        $this->content = $content;
154
        return $this;
155
    }
156
157
    /**
158
     * {@inheritdoc}
159
     */
160
    public function setDisabled($disabled) {
161
        $this->disabled = $disabled;
162
        return $this;
163
    }
164
165
    /**
166
     * {@inheritdoc}
167
     */
168
    public function setSize($size) {
169
        $this->size = $size;
170
        return $this;
171
    }
172
173
    /**
174
     * {@inheritdoc}
175
     */
176
    public function setTitle($title) {
177
        $this->title = $title;
178
        return $this;
179
    }
180
181
    /**
182
     * {@inheritdoc}
183
     */
184
    public function setType($type) {
185
        $this->type = $type;
186
        return $this;
187
    }
188
189
}
190