1 | <?php |
||
26 | class AlertTwigExtension extends AbstractAlertTwigExtension { |
||
27 | |||
28 | /** |
||
29 | * Service name. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | const SERVICE_NAME = "wbw.bootstrap.twig.extension.component.alert"; |
||
34 | |||
35 | /** |
||
36 | * Displays a Bootstrap alert "danger". |
||
37 | * |
||
38 | * @param array $args The arguments. |
||
39 | * @return string Returns the Bootstrap alert "danger". |
||
40 | */ |
||
41 | public function bootstrapAlertDangerFunction(array $args = []) { |
||
42 | return $this->bootstrapAlert(AlertFactory::parseDangerAlert($args)); |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * Displays a Bootstrap alert "dark". |
||
47 | * |
||
48 | * @param array $args The arguments. |
||
49 | * @return string Returns the Bootstrap alert "dark". |
||
50 | */ |
||
51 | public function bootstrapAlertDarkFunction(array $args = []) { |
||
52 | return $this->bootstrapAlert(AlertFactory::parseDarkAlert($args)); |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * Displays a Bootstrap alert "info". |
||
57 | * |
||
58 | * @param array $args The arguments. |
||
59 | * @return string Returns the Bootstrap alert "info". |
||
60 | */ |
||
61 | public function bootstrapAlertInfoFunction(array $args = []) { |
||
64 | |||
65 | /** |
||
66 | * Displays a Bootstrap alert "light". |
||
67 | * |
||
68 | * @param array $args The arguments. |
||
69 | * @return string Returns the Bootstrap alert "light". |
||
70 | */ |
||
71 | public function bootstrapAlertLightFunction(array $args = []) { |
||
74 | |||
75 | /** |
||
76 | * Displays a Bootstrap alert "link". |
||
77 | * |
||
78 | * @param array $args The arguments. |
||
79 | * @return string Returns the Bootstrap alert "link". |
||
80 | */ |
||
81 | public function bootstrapAlertLinkFunction(array $args = []) { |
||
91 | |||
92 | /** |
||
93 | * Displays a Bootstrap alert "secondary". |
||
94 | * |
||
95 | * @param array $args The arguments. |
||
96 | * @return string Returns the Bootstrap alert "secondary". |
||
97 | */ |
||
98 | public function bootstrapAlertSecondaryFunction(array $args = []) { |
||
101 | |||
102 | /** |
||
103 | * Displays a Bootstrap alert "success". |
||
104 | * |
||
105 | * @param array $args The arguments. |
||
106 | * @return string Returns the Bootstrap alert "success". |
||
107 | */ |
||
108 | public function bootstrapAlertSuccessFunction(array $args = []) { |
||
111 | |||
112 | /** |
||
113 | * Displays a Bootstrap alert "warning". |
||
114 | * |
||
115 | * @param array $args The arguments. |
||
116 | * @return string Returns the Bootstrap alert "warning". |
||
117 | */ |
||
118 | public function bootstrapAlertWarningFunction(array $args = []) { |
||
121 | |||
122 | /** |
||
123 | * Get the Twig functions. |
||
124 | * |
||
125 | * @return TwigFunction[] Returns the Twig functions. |
||
126 | */ |
||
127 | public function getFunctions() { |
||
154 | } |
||
155 |