1 | <?php |
||
12 | class BootstrapButtonExtension extends Twig_Extension |
||
13 | { |
||
14 | /** |
||
15 | * @var BootstrapIconExtension |
||
16 | */ |
||
17 | private $iconExtension; |
||
18 | |||
19 | private $defaults = array( |
||
20 | 'label' => '', |
||
21 | 'icon' => false, |
||
22 | 'type' => 'default', |
||
23 | 'size' => 'md', |
||
24 | 'attr' => array(), |
||
25 | ); |
||
26 | |||
27 | /** |
||
28 | * @param BootstrapIconExtension $iconExtension |
||
29 | */ |
||
30 | public function __construct(BootstrapIconExtension $iconExtension) |
||
34 | |||
35 | /** |
||
36 | * {@inheritDoc} |
||
37 | */ |
||
38 | public function getFunctions() |
||
45 | |||
46 | /** |
||
47 | * @param array $options |
||
48 | * @return string |
||
49 | */ |
||
50 | public function buttonFunction(array $options = array()) |
||
64 | |||
65 | /** |
||
66 | * @param array $options |
||
67 | * @return string |
||
68 | */ |
||
69 | public function buttonLinkFunction(array $options = array()) |
||
83 | |||
84 | private function attributes(array $attributes) |
||
92 | |||
93 | /** |
||
94 | * {@inheritDoc} |
||
95 | */ |
||
96 | public function getName() |
||
100 | } |
||
101 |