1 | <?php |
||
24 | class BootstrapLabelExtension extends Twig_Extension |
||
25 | { |
||
26 | /** |
||
27 | * {@inheritDoc} |
||
28 | */ |
||
29 | public function getFunctions() |
||
42 | |||
43 | /** |
||
44 | * Returns the HTML code for a label. |
||
45 | * |
||
46 | * @param string $text The text of the label |
||
47 | * @param string $type The type of label |
||
48 | * |
||
49 | * @return string The HTML code of the label |
||
50 | */ |
||
51 | public function labelFunction($text, $type = 'default') |
||
55 | |||
56 | /** |
||
57 | * @param string $text |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public function labelPrimaryFunction($text) |
||
65 | |||
66 | /** |
||
67 | * Returns the HTML code for a success label. |
||
68 | * |
||
69 | * @param string $text The text of the label |
||
70 | * |
||
71 | * @return string The HTML code of the label |
||
72 | */ |
||
73 | public function labelSuccessFunction($text) |
||
77 | |||
78 | /** |
||
79 | * Returns the HTML code for a warning label. |
||
80 | * |
||
81 | * @param string $text The text of the label |
||
82 | * |
||
83 | * @return string The HTML code of the label |
||
84 | */ |
||
85 | public function labelWarningFunction($text) |
||
89 | |||
90 | /** |
||
91 | * Returns the HTML code for a important label. |
||
92 | * |
||
93 | * @param string $text The text of the label |
||
94 | * |
||
95 | * @return string The HTML code of the label |
||
96 | */ |
||
97 | public function labelDangerFunction($text) |
||
101 | |||
102 | /** |
||
103 | * Returns the HTML code for a info label. |
||
104 | * |
||
105 | * @param string $text The text of the label |
||
106 | * |
||
107 | * @return string The HTML code of the label |
||
108 | */ |
||
109 | public function labelInfoFunction($text) |
||
113 | |||
114 | /** |
||
115 | * {@inheritDoc} |
||
116 | */ |
||
117 | public function getName() |
||
121 | } |
||
122 |