1 | <?php |
||
23 | class GridTwigExtension extends AbstractGridTwigExtension { |
||
24 | |||
25 | /** |
||
26 | * Service name. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | const SERVICE_NAME = "webeweb.bundle.bootstrapbundle.twig.extension.grid.grid"; |
||
31 | |||
32 | /** |
||
33 | * Constructor. |
||
34 | */ |
||
35 | public function __construct() { |
||
38 | |||
39 | /** |
||
40 | * Displays a Bootstrap grid. |
||
41 | * |
||
42 | * @param array $args The arguments. |
||
43 | * @return string Returns the Bootstrap grid. |
||
44 | */ |
||
45 | public function bootstrapGridFunction(array $args = []) { |
||
58 | |||
59 | /** |
||
60 | * Displays a Bootstrap grid with offset. |
||
61 | * |
||
62 | * @param array $args The arguments. |
||
63 | * @return string Returns the Bootstrap grid with offset. |
||
64 | */ |
||
65 | public function bootstrapGridOffsetFunction(array $args = []) { |
||
66 | return $this->bootstrapGrid(ArrayUtility::get($args, "lgOffset"), ArrayUtility::get($args, "mdOffset"), ArrayUtility::get($args, "smOffset"), ArrayUtility::get($args, "xsOffset"), ArrayUtility::get($args, "recopyOffset", false), "offset-"); |
||
67 | } |
||
68 | |||
69 | /** |
||
70 | * Displays a Bootstrap grid with pull. |
||
71 | * |
||
72 | * @param array $args The arguments. |
||
73 | * @return string Returns the Bootstrap grid with pull. |
||
74 | */ |
||
75 | public function bootstrapGridPullFunction(array $args = []) { |
||
76 | return $this->bootstrapGrid(ArrayUtility::get($args, "lgPull"), ArrayUtility::get($args, "mdPull"), ArrayUtility::get($args, "smPull"), ArrayUtility::get($args, "xsPull"), ArrayUtility::get($args, "recopyPull", false), "pull-"); |
||
77 | } |
||
78 | |||
79 | /** |
||
80 | * Displays a Bootstrap grid with push. |
||
81 | * |
||
82 | * @param array $args The arguments. |
||
83 | * @return string Returns the Bootstrap grid with push. |
||
84 | */ |
||
85 | public function bootstrapGridPushFunction(array $args = []) { |
||
86 | return $this->bootstrapGrid(ArrayUtility::get($args, "lgPush"), ArrayUtility::get($args, "mdPush"), ArrayUtility::get($args, "smPush"), ArrayUtility::get($args, "xsPush"), ArrayUtility::get($args, "recopyPush", false), "push-"); |
||
87 | } |
||
88 | |||
89 | /** |
||
90 | * Displays a Bootstrap grid with stacked-to-horizontal. |
||
91 | * |
||
92 | * @param array $args The arguments. |
||
93 | * @return string Returns the Bootstrap grid with stacked-to-horizontal. |
||
94 | */ |
||
95 | public function bootstrapGridStackedFunction(array $args = []) { |
||
96 | return $this->bootstrapGrid(ArrayUtility::get($args, "lg"), ArrayUtility::get($args, "md"), ArrayUtility::get($args, "sm"), ArrayUtility::get($args, "xs"), ArrayUtility::get($args, "recopy", false), ""); |
||
97 | } |
||
98 | |||
99 | /** |
||
100 | * Get the Twig functions. |
||
101 | * |
||
102 | * @return array Returns the Twig functions. |
||
103 | */ |
||
104 | public function getFunctions() { |
||
113 | |||
114 | } |
||
115 |