1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the adminbsb-material-design-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\AdminBSBBundle\Twig\Extension\Typography; |
13
|
|
|
|
14
|
|
|
use WBW\Bundle\BootstrapBundle\Twig\Extension\CSS\TypographyTwigExtension as BaseTwigExtension; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Abstract typography Twig extension. |
18
|
|
|
* |
19
|
|
|
* @author webeweb <https://github.com/webeweb/> |
20
|
|
|
* @package WBW\Bundle\AdminBSBBundle\Twig\Extension\Typography |
21
|
|
|
* @abstract |
22
|
|
|
*/ |
23
|
|
|
abstract class AbstractTypographyTwigExtension extends BaseTwigExtension { |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Displays an AdminBSB bold text. |
27
|
|
|
* |
28
|
|
|
* @param string $content The content. |
29
|
|
|
* @return string Returns the AdminBSB bold text. |
30
|
|
|
*/ |
31
|
|
|
protected function adminBSBBold($content) { |
32
|
|
|
return static::coreHTMLElement("span", $content, ["class" => "font-bold"]); |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* Displays an AdminBSB italic text. |
37
|
|
|
* |
38
|
|
|
* @param string $content The content. |
39
|
|
|
* @return string Returns the AdminBSB italic text. |
40
|
|
|
*/ |
41
|
|
|
protected function adminBSBItalic($content) { |
42
|
|
|
return static::coreHTMLElement("span", $content, ["class" => "font-italic"]); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Displays an AdminBSB line through text. |
47
|
|
|
* |
48
|
|
|
* @param string $content The content. |
49
|
|
|
* @return string Returns the AdminBSB line through text. |
50
|
|
|
*/ |
51
|
|
|
protected function adminBSBLineThrough($content) { |
52
|
|
|
return static::coreHTMLElement("span", $content, ["class" => "font-line-through"]); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Displays an AdminBSB overlined text. |
57
|
|
|
* |
58
|
|
|
* @param string $content The content. |
59
|
|
|
* @return string Returns the AdminBSB overlined text. |
60
|
|
|
*/ |
61
|
|
|
protected function adminBSBOverline($content) { |
62
|
|
|
return static::coreHTMLElement("span", $content, ["class" => "font-overline"]); |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* Displays an AdminBSB underlined text. |
67
|
|
|
* |
68
|
|
|
* @param string $content The content. |
69
|
|
|
* @return string Returns the AdminBSB underlined text. |
70
|
|
|
*/ |
71
|
|
|
protected function adminBSBUnderline($content) { |
72
|
|
|
return static::coreHTMLElement("span", $content, ["class" => "font-underline"]); |
73
|
|
|
} |
74
|
|
|
} |
75
|
|
|
|