1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the core-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\CoreBundle\Icon; |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* Font Awesome icon. |
16
|
|
|
* |
17
|
|
|
* @author webeweb <https://github.com/webeweb/> |
18
|
|
|
* @package WBW\Bundle\CoreBundle\Icon |
19
|
|
|
*/ |
20
|
|
|
class FontAwesomeIcon extends AbstractIcon implements FontAwesomeIconInterface { |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Animation. |
24
|
|
|
* |
25
|
|
|
* @var string |
26
|
|
|
*/ |
27
|
|
|
private $animation; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Bordered. |
31
|
|
|
* |
32
|
|
|
* @var bool |
33
|
|
|
*/ |
34
|
|
|
private $bordered; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Fixed width; |
38
|
|
|
* |
39
|
|
|
* @var bool |
40
|
|
|
*/ |
41
|
|
|
private $fixedWidth; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* Font. |
45
|
|
|
* |
46
|
|
|
* @var string |
47
|
|
|
*/ |
48
|
|
|
private $font; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* Pull. |
52
|
|
|
* |
53
|
|
|
* @var string |
54
|
|
|
*/ |
55
|
|
|
private $pull; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Size. |
59
|
|
|
* |
60
|
|
|
* @var string |
61
|
|
|
*/ |
62
|
|
|
private $size; |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* Constructor. |
66
|
|
|
*/ |
67
|
|
|
public function __construct() { |
68
|
|
|
parent::__construct(); |
69
|
|
|
$this->setBordered(false); |
70
|
|
|
$this->setFixedWidth(false); |
71
|
|
|
$this->setFont(self::FONT_AWESOME_FONT); |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* {@inheritdoc} |
76
|
|
|
*/ |
77
|
|
|
public function getAnimation() { |
78
|
|
|
return $this->animation; |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* {@inheritdoc} |
83
|
|
|
*/ |
84
|
|
|
public function getBordered() { |
85
|
|
|
return $this->bordered; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* {@inheritdoc} |
90
|
|
|
*/ |
91
|
|
|
public function getFixedWidth() { |
92
|
|
|
return $this->fixedWidth; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* {@inheritdoc} |
97
|
|
|
*/ |
98
|
|
|
public function getFont() { |
99
|
|
|
return $this->font; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* {@inheritdoc} |
104
|
|
|
*/ |
105
|
|
|
public function getPull() { |
106
|
|
|
return $this->pull; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* {@inheritdoc} |
111
|
|
|
*/ |
112
|
|
|
public function getSize() { |
113
|
|
|
return $this->size; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* {@inheritdoc} |
118
|
|
|
*/ |
119
|
|
|
public function setAnimation($animation) { |
120
|
|
|
$this->animation = $animation; |
121
|
|
|
return $this; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* {@inheritdoc} |
126
|
|
|
*/ |
127
|
|
|
public function setBordered($bordered) { |
128
|
|
|
$this->bordered = $bordered; |
129
|
|
|
return $this; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
/** |
133
|
|
|
* {@inheritdoc} |
134
|
|
|
*/ |
135
|
|
|
public function setFixedWidth($fixedWidth) { |
136
|
|
|
$this->fixedWidth = $fixedWidth; |
137
|
|
|
return $this; |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
/** |
141
|
|
|
* {@inheritdoc} |
142
|
|
|
*/ |
143
|
|
|
public function setFont($font) { |
144
|
|
|
$this->font = $font; |
145
|
|
|
return $this; |
146
|
|
|
} |
147
|
|
|
|
148
|
|
|
/** |
149
|
|
|
* {@inheritdoc} |
150
|
|
|
*/ |
151
|
|
|
public function setPull($pull) { |
152
|
|
|
$this->pull = $pull; |
153
|
|
|
return $this; |
154
|
|
|
} |
155
|
|
|
|
156
|
|
|
/** |
157
|
|
|
* {@inheritdoc} |
158
|
|
|
*/ |
159
|
|
|
public function setSize($size) { |
160
|
|
|
$this->size = $size; |
161
|
|
|
return $this; |
162
|
|
|
} |
163
|
|
|
|
164
|
|
|
} |
165
|
|
|
|