These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of the bootstrap-bundle package. |
||
5 | * |
||
6 | * (c) 2018 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\Twig\Extension\CSS; |
||
13 | |||
14 | use Twig_SimpleFunction; |
||
15 | use WBW\Library\Core\Argument\ArrayHelper; |
||
16 | |||
17 | /** |
||
18 | * Typography Twig extension. |
||
19 | * |
||
20 | * @author webeweb <https://github.com/webeweb/> |
||
21 | * @package WBW\Bundle\BootstrapBundle\Twig\Extension\CSS |
||
22 | * @link https://getbootstrap.com/docs/3.3/css/#type |
||
23 | */ |
||
24 | class TypographyTwigExtension extends AbstractTypographyTwigExtension { |
||
25 | |||
26 | /** |
||
27 | * Service name. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | const SERVICE_NAME = "webeweb.bootstrap.twig.extension.css.typography"; |
||
32 | |||
33 | /** |
||
34 | * Displays a Bootstrap bold text. |
||
35 | * |
||
36 | * @param array $args The arguments. |
||
37 | * @return string Returns the Bootstrap bold text. |
||
38 | */ |
||
39 | public function bootstrapBoldFunction(array $args = []) { |
||
40 | return $this->bootstrapBold(ArrayHelper::get($args, "content")); |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * Displays a Bootstrap deleted text. |
||
45 | * |
||
46 | * @param array $args The arguments. |
||
47 | * @return string Returns the Bootstrap deleted text. |
||
48 | */ |
||
49 | public function bootstrapDeletedFunction(array $args = []) { |
||
50 | return $this->bootstrapDeleted(ArrayHelper::get($args, "content")); |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * Displays a Boostrap heading 1. |
||
55 | * |
||
56 | * @param array $args The arguments. |
||
57 | * @return string Returns the Bootstrap heading 1. |
||
58 | */ |
||
59 | public function bootstrapHeading1Function(array $args = []) { |
||
60 | return $this->bootstrapHeading(1, ArrayHelper::get($args, "content"), ArrayHelper::get($args, "description"), ArrayHelper::get($args, "class")); |
||
61 | } |
||
62 | |||
63 | /** |
||
64 | * Displays a Bootstrap heading 2. |
||
65 | * |
||
66 | * @param array $args The arguments. |
||
67 | * @return string Returns the Bootstrap heading 2. |
||
68 | */ |
||
69 | public function bootstrapHeading2Function(array $args = []) { |
||
70 | return $this->bootstrapHeading(2, ArrayHelper::get($args, "content"), ArrayHelper::get($args, "description"), ArrayHelper::get($args, "class")); |
||
71 | } |
||
72 | |||
73 | /** |
||
74 | * Displays a Bootstrap heading 3. |
||
75 | * |
||
76 | * @param array $args The arguments. |
||
77 | * @return string Returns the Bootstrap heading 3. |
||
78 | */ |
||
79 | public function bootstrapHeading3Function(array $args = []) { |
||
80 | return $this->bootstrapHeading(3, ArrayHelper::get($args, "content"), ArrayHelper::get($args, "description"), ArrayHelper::get($args, "class")); |
||
81 | } |
||
82 | |||
83 | /** |
||
84 | * Displays a Bootstrap heading 4. |
||
85 | * |
||
86 | * @param array $args The arguments. |
||
87 | * @return string Returns the Bootstrap heading 4. |
||
88 | */ |
||
89 | public function bootstrapHeading4Function(array $args = []) { |
||
90 | return $this->bootstrapHeading(4, ArrayHelper::get($args, "content"), ArrayHelper::get($args, "description"), ArrayHelper::get($args, "class")); |
||
91 | } |
||
92 | |||
93 | /** |
||
94 | * Displays a heading 5. |
||
95 | * |
||
96 | * @param array $args The arguments. |
||
97 | * @return string Returns the Bootstrap heading 5. |
||
98 | */ |
||
99 | public function bootstrapHeading5Function(array $args = []) { |
||
100 | return $this->bootstrapHeading(5, ArrayHelper::get($args, "content"), ArrayHelper::get($args, "description"), ArrayHelper::get($args, "class")); |
||
101 | } |
||
102 | |||
103 | /** |
||
104 | * Displays a Bootstrap heading 6. |
||
105 | * |
||
106 | * @param array $args The arguments. |
||
107 | * @return string Returns the Bootstrap heading 6. |
||
108 | */ |
||
109 | public function bootstrapHeading6Function(array $args = []) { |
||
110 | return $this->bootstrapHeading(6, ArrayHelper::get($args, "content"), ArrayHelper::get($args, "description"), ArrayHelper::get($args, "class")); |
||
111 | } |
||
112 | |||
113 | /** |
||
114 | * Displays a Bootstrap inserted text. |
||
115 | * |
||
116 | * @param array $args The arguments. |
||
117 | * @return string Returns the Bootstrap inserted text. |
||
118 | */ |
||
119 | public function bootstrapInsertedFunction(array $args = []) { |
||
120 | return $this->bootstrapInserted(ArrayHelper::get($args, "content")); |
||
121 | } |
||
122 | |||
123 | /** |
||
124 | * Displays a Bootstrap italic text. |
||
125 | * |
||
126 | * @param array $args The arguments. |
||
127 | * @return string Returns the Bootstrap italic text. |
||
128 | */ |
||
129 | public function bootstrapItalicFunction(array $args = []) { |
||
130 | return $this->bootstrapItalic(ArrayHelper::get($args, "content")); |
||
131 | } |
||
132 | |||
133 | /** |
||
134 | * Displays a Bootstrap marked text. |
||
135 | * |
||
136 | * @param array $args The arguments. |
||
137 | * @return string Returns the Bootstrap marked text. |
||
138 | */ |
||
139 | public function bootstrapMarkedFunction(array $args = []) { |
||
140 | return $this->bootstrapMarked(ArrayHelper::get($args, "content")); |
||
141 | } |
||
142 | |||
143 | /** |
||
144 | * Displays a Bootstrap small text. |
||
145 | * |
||
146 | * @param array $args The arguments. |
||
147 | * @return string Returns the Bootstrap small text. |
||
148 | */ |
||
149 | public function bootstrapSmallFunction(array $args = []) { |
||
150 | return $this->bootstrapSmall(ArrayHelper::get($args, "content")); |
||
151 | } |
||
152 | |||
153 | /** |
||
154 | * Displays a Bootstrap strike through text. |
||
155 | * |
||
156 | * @param array $args The arguments. |
||
157 | * @return string Returns the Bootstrap strike through text. |
||
158 | */ |
||
159 | public function bootstrapStrikeThroughFunction(array $args = []) { |
||
160 | return $this->bootstrapStrikeThrough(ArrayHelper::get($args, "content")); |
||
161 | } |
||
162 | |||
163 | /** |
||
164 | * Displays a Bootstrap underlined text. |
||
165 | * |
||
166 | * @param array $args The arguments. |
||
167 | * @return string Returns the Bootstrap underlined text. |
||
168 | */ |
||
169 | public function bootstrapUnderlinedFunction(array $args = []) { |
||
170 | return $this->bootstrapUnderlined(ArrayHelper::get($args, "content")); |
||
171 | } |
||
172 | |||
173 | /** |
||
174 | * Get the Twig functions. |
||
175 | * |
||
176 | * @return array Returns the Twig functions. |
||
177 | */ |
||
178 | public function getFunctions() { |
||
179 | return [ |
||
180 | new Twig_SimpleFunction("bootstrapBold", [$this, "bootstrapBoldFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
|
|||
181 | new Twig_SimpleFunction("bsBold", [$this, "bootstrapBoldFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
182 | |||
183 | new Twig_SimpleFunction("bootstrapDeleted", [$this, "bootstrapDeletedFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
184 | new Twig_SimpleFunction("bsDeleted", [$this, "bootstrapDeletedFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
185 | |||
186 | new Twig_SimpleFunction("bootstrapHeading1", [$this, "bootstrapHeading1Function"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
187 | new Twig_SimpleFunction("bsHeading1", [$this, "bootstrapHeading1Function"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
188 | |||
189 | new Twig_SimpleFunction("bootstrapHeading2", [$this, "bootstrapHeading2Function"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
190 | new Twig_SimpleFunction("bsHeading2", [$this, "bootstrapHeading2Function"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
191 | |||
192 | new Twig_SimpleFunction("bootstrapHeading3", [$this, "bootstrapHeading3Function"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
193 | new Twig_SimpleFunction("bsHeading3", [$this, "bootstrapHeading3Function"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
194 | |||
195 | new Twig_SimpleFunction("bootstrapHeading4", [$this, "bootstrapHeading4Function"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
196 | new Twig_SimpleFunction("bsHeading4", [$this, "bootstrapHeading4Function"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
197 | |||
198 | new Twig_SimpleFunction("bootstrapHeading5", [$this, "bootstrapHeading5Function"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
199 | new Twig_SimpleFunction("bsHeading5", [$this, "bootstrapHeading5Function"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
200 | |||
201 | new Twig_SimpleFunction("bootstrapHeading6", [$this, "bootstrapHeading6Function"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
202 | new Twig_SimpleFunction("bsHeading6", [$this, "bootstrapHeading6Function"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
203 | |||
204 | new Twig_SimpleFunction("bootstrapInserted", [$this, "bootstrapInsertedFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
205 | new Twig_SimpleFunction("bsInserted", [$this, "bootstrapInsertedFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
206 | |||
207 | new Twig_SimpleFunction("bootstrapItalic", [$this, "bootstrapItalicFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
208 | new Twig_SimpleFunction("bsItalic", [$this, "bootstrapItalicFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
209 | |||
210 | new Twig_SimpleFunction("bootstrapMarked", [$this, "bootstrapMarkedFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
211 | new Twig_SimpleFunction("bsMarked", [$this, "bootstrapMarkedFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
212 | |||
213 | new Twig_SimpleFunction("bootstrapSmall", [$this, "bootstrapSmallFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
214 | new Twig_SimpleFunction("bsSmall", [$this, "bootstrapSmallFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
215 | |||
216 | new Twig_SimpleFunction("bootstrapStrikethrough", [$this, "bootstrapStrikethroughFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
217 | new Twig_SimpleFunction("bsStrikethrough", [$this, "bootstrapStrikethroughFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
218 | |||
219 | new Twig_SimpleFunction("bootstrapUnderlined", [$this, "bootstrapUnderlinedFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
220 | new Twig_SimpleFunction("bsUnderlined", [$this, "bootstrapUnderlinedFunction"], ["is_safe" => ["html"]]), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
221 | ]; |
||
222 | } |
||
223 | } |
||
224 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.