1 | <?php |
||
25 | final class ButtonComponentTwigExtension extends AbstractComponentTwigExtension { |
||
26 | |||
27 | /** |
||
28 | * Service name. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | const SERVICE_NAME = "webeweb.bundle.bootstrapbundle.twig.extension.component.button"; |
||
33 | |||
34 | /** |
||
35 | * Displays a Bootstrap button "Danger". |
||
36 | * |
||
37 | * @param array $args The arguments. |
||
38 | * @return string Returns the Bootstrap button "Danger". |
||
39 | */ |
||
40 | public function bootstrapButtonDangerFunction(array $args = []) { |
||
43 | |||
44 | /** |
||
45 | * Displays a Bootstrap button "Default". |
||
46 | * |
||
47 | * @param array $args The arguments. |
||
48 | * @return string Returns the Bootstrap button "Default". |
||
49 | */ |
||
50 | public function bootstrapButtonDefaultFunction(array $args = []) { |
||
53 | |||
54 | /** |
||
55 | * Displays a Bootstrap button "Info". |
||
56 | * |
||
57 | * @param array $args The arguments. |
||
58 | * @return string Returns the Bootstrap button "Info". |
||
59 | */ |
||
60 | public function bootstrapButtonInfoFunction(array $args = []) { |
||
63 | |||
64 | /** |
||
65 | * Transforms a Bootstrap button into an anchor. |
||
66 | * |
||
67 | * @param string $bootstrapButton |
||
68 | * @param string $href The href attribute. |
||
69 | * @return string Returns the Bootstrap button transformed into an anchor. |
||
70 | */ |
||
71 | public function bootstrapButtonLinkFilter($bootstrapButton, $href = self::DEFAULT_HREF) { |
||
74 | |||
75 | /** |
||
76 | * Displays a Bootstrap button "Link". |
||
77 | * |
||
78 | * @param array $args The arguments. |
||
79 | * @return string Returns the Bootstrap button "Link". |
||
80 | */ |
||
81 | public function bootstrapButtonLinkFunction(array $args = []) { |
||
84 | |||
85 | /** |
||
86 | * Displays a Bootstrap button "Primary". |
||
87 | * |
||
88 | * @param array $args The arguments. |
||
89 | * @return string Returns the Bootstrap button "Primary". |
||
90 | */ |
||
91 | public function bootstrapButtonPrimaryFunction(array $args = []) { |
||
94 | |||
95 | /** |
||
96 | * Displays a Bootstrap button "Success". |
||
97 | * |
||
98 | * @param array $args The arguments. |
||
99 | * @return string Returns the Bootstrap button "Success". |
||
100 | */ |
||
101 | public function bootstrapButtonSuccessFunction(array $args = []) { |
||
104 | |||
105 | /** |
||
106 | * Displays a Bootstrap button "Warning". |
||
107 | * |
||
108 | * @param array $args The arguments. |
||
109 | * @return string Returns the Bootstrap button "Warning". |
||
110 | */ |
||
111 | public function bootstrapButtonWarningFunction(array $args = []) { |
||
114 | |||
115 | /** |
||
116 | * Get the Twig filters. |
||
117 | * |
||
118 | * @return Twig_SimpleFilter[] Returns the Twig filters. |
||
119 | */ |
||
120 | public function getFilters() { |
||
125 | |||
126 | /** |
||
127 | * Get the Twig functions. |
||
128 | * |
||
129 | * @return Twig_SimpleFunction[] Returns the Twig functions. |
||
130 | */ |
||
131 | public function getFunctions() { |
||
142 | |||
143 | } |
||
144 |