1 | <?php |
||
23 | class ProgressBarComponentTwigExtension extends AbstractComponentTwigExtension { |
||
24 | |||
25 | /** |
||
26 | * Service name. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | const SERVICE_NAME = "webeweb.bundle.bootstrapbundle.twig.extension.component.progressbar"; |
||
31 | |||
32 | /** |
||
33 | * Constructor. |
||
34 | */ |
||
35 | public function __construct() { |
||
38 | |||
39 | /** |
||
40 | * Displays a Bootstrap progress bar "Basic". |
||
41 | * |
||
42 | * @param array $args The arguments. |
||
43 | * @return string Returns the Bootstrap progress bar "Basic". |
||
44 | */ |
||
45 | public function bootstrapProgressBarBasicFunction(array $args = []) { |
||
46 | return $this->bootstrapProgressBar(ArrayUtility::get($args, "content"), ArrayUtility::get($args, "value", 50), ArrayUtility::get($args, "min", 0), ArrayUtility::get($args, "max", 100), ArrayUtility::get($args, "striped", false), ArrayUtility::get($args, "animated", false)); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * Displays a Bootstrap progress bar "Danger". |
||
51 | * |
||
52 | * @param array $args The arguments. |
||
53 | * @return string Returns the Bootstrap progress bar "Danger". |
||
54 | */ |
||
55 | public function bootstrapProgressBarDangerFunction(array $args = []) { |
||
58 | |||
59 | /** |
||
60 | * Displays a Bootstrap progress bar "Info". |
||
61 | * |
||
62 | * @param array $args The arguments. |
||
63 | * @return string Returns the Bootstrap progress bar "Info". |
||
64 | */ |
||
65 | public function bootstrapProgressBarInfoFunction(array $args = []) { |
||
68 | |||
69 | /** |
||
70 | * Displays a Bootstrap progress bar "Success". |
||
71 | * |
||
72 | * @param array $args The arguments. |
||
73 | * @return string Returns the Bootstrap progress bar "Success". |
||
74 | */ |
||
75 | public function bootstrapProgressBarSuccessFunction(array $args = []) { |
||
78 | |||
79 | /** |
||
80 | * Displays a Bootstrap progress bar "Warning". |
||
81 | * |
||
82 | * @param array $args The arguments. |
||
83 | * @return string Returns the Bootstrap progress bar "Warning". |
||
84 | */ |
||
85 | public function bootstrapProgressBarWarningFunction(array $args = []) { |
||
88 | |||
89 | /** |
||
90 | * Get the Twig functions. |
||
91 | * |
||
92 | * @return Twig_SimpleFunction[] Returns the Twig functions. |
||
93 | */ |
||
94 | public function getFunctions() { |
||
103 | |||
104 | } |
||
105 |