Completed
Push — master ( f922dc...a7a5cc )
by WEBEWEB
02:58 queued 12s
created

AbstractButton::getPrefix()   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->setType($type);
79
    }
80
81
    /**
82
     * {@inheritdoc}
83
     */
84
    public function getActive() {
85
        return $this->active;
86
    }
87
88
    /**
89
     * {@inheritdoc}
90
     */
91
    public function getBlock() {
92
        return $this->block;
93
    }
94
95
    /**
96
     * {@inheritdoc}
97
     */
98
    public function getContent() {
99
        return $this->content;
100
    }
101
102
    /**
103
     * {@inheritdoc}
104
     */
105
    public function getDisabled() {
106
        return $this->disabled;
107
    }
108
109
    /**
110
     * {@inheritdoc}
111
     */
112
    public function getPrefix() {
113
        return "btn-";
114
    }
115
116
    /**
117
     * {@inheritdoc}
118
     */
119
    public function getSize() {
120
        return $this->size;
121
    }
122
123
    /**
124
     * {@inheritdoc}
125
     */
126
    public function getTitle() {
127
        return $this->title;
128
    }
129
130
    /**
131
     * {@inheritdoc}
132
     */
133
    public function getType() {
134
        return $this->type;
135
    }
136
137
    /**
138
     * {@inheritdoc}
139
     */
140
    public function setActive($active) {
141
        $this->active = $active;
142
        return $this;
143
    }
144
145
    /**
146
     * {@inheritdoc}
147
     */
148
    public function setBlock($block) {
149
        $this->block = $block;
150
        return $this;
151
    }
152
153
    /**
154
     * {@inheritdoc}
155
     */
156
    public function setContent($content) {
157
        $this->content = $content;
158
        return $this;
159
    }
160
161
    /**
162
     * {@inheritdoc}
163
     */
164
    public function setDisabled($disabled) {
165
        $this->disabled = $disabled;
166
        return $this;
167
    }
168
169
    /**
170
     * {@inheritdoc}
171
     */
172
    public function setSize($size) {
173
        $this->size = $size;
174
        return $this;
175
    }
176
177
    /**
178
     * {@inheritdoc}
179
     */
180
    public function setTitle($title) {
181
        $this->title = $title;
182
        return $this;
183
    }
184
185
    /**
186
     * {@inheritdoc}
187
     */
188
    public function setType($type) {
189
        $this->type = $type;
190
        return $this;
191
    }
192
}
193