1 | <?php |
||
35 | class Bootstrap extends BaseGui { |
||
36 | |||
37 | public function __construct($autoCompile=true) { |
||
40 | |||
41 | /** |
||
42 | * |
||
43 | * @param string $attachTo |
||
44 | * @param string|array $params |
||
45 | * @return $this |
||
46 | */ |
||
47 | public function generic($attachTo=NULL, $params=NULL) { |
||
50 | |||
51 | /** |
||
52 | * |
||
53 | * @param string $attachTo |
||
54 | * @param string|array $params |
||
55 | * @return $this |
||
56 | */ |
||
57 | public function modal($attachTo=NULL, $params=NULL) { |
||
60 | |||
61 | /** |
||
62 | * |
||
63 | * @param string $attachTo |
||
64 | * @param string|array $params |
||
65 | * @return $this |
||
66 | */ |
||
67 | public function tooltip($attachTo=NULL, $params=NULL) { |
||
70 | |||
71 | /** |
||
72 | * |
||
73 | * @param string $attachTo |
||
74 | * @param string|array $params |
||
75 | * @return $this |
||
76 | */ |
||
77 | public function popover($attachTo=NULL, $params=NULL) { |
||
80 | |||
81 | /** |
||
82 | * |
||
83 | * @param string $attachTo |
||
84 | * @param string|array $params |
||
85 | * @return $this |
||
86 | */ |
||
87 | public function dropdown($attachTo=NULL, $params=NULL) { |
||
90 | |||
91 | /** |
||
92 | * |
||
93 | * @param string $attachTo |
||
94 | * @param string|array $params |
||
95 | * @return $this |
||
96 | */ |
||
97 | public function splitbutton($attachTo=NULL, $params=NULL) { |
||
100 | |||
101 | /** |
||
102 | * |
||
103 | * @param string $attachTo |
||
104 | * @param string|array $params |
||
105 | * @return $this |
||
106 | */ |
||
107 | public function tab($attachTo=NULL, $params=NULL) { |
||
110 | |||
111 | /** |
||
112 | * |
||
113 | * @param string $attachTo |
||
114 | * @param string|array $params |
||
115 | * @return $this |
||
116 | */ |
||
117 | public function collapse($attachTo=NULL, $params=NULL) { |
||
120 | |||
121 | /** |
||
122 | * |
||
123 | * @param string $attachTo |
||
124 | * @param string|array $params |
||
125 | * @return $this |
||
126 | */ |
||
127 | public function carousel($attachTo=NULL, $params=NULL) { |
||
130 | |||
131 | /** |
||
132 | * Return a new Bootstrap Html Button |
||
133 | * @param string $identifier |
||
134 | * @param string $value |
||
135 | * @param string $cssStyle |
||
136 | * @param string $onClick |
||
137 | * @return HtmlButton |
||
138 | */ |
||
139 | public function htmlButton($identifier, $value="", $cssStyle=null, $onClick=null) { |
||
142 | |||
143 | /** |
||
144 | * Return a new Bootstrap Html Glyphbutton |
||
145 | * @param string $identifier |
||
146 | * @param mixed $glyphIcon |
||
147 | * @param string $value |
||
148 | * @param string $cssStyle |
||
149 | * @param string $onClick |
||
150 | * @return HtmlGlyphButton |
||
151 | */ |
||
152 | public function htmlGlyphButton($identifier, $glyphIcon=0, $value="", $cssStyle=NULL, $onClick=NULL) { |
||
155 | |||
156 | /** |
||
157 | * Return a new Bootstrap Html Buttongroups |
||
158 | * @param string $identifier |
||
159 | * @param array $values |
||
160 | * @param string $cssStyle |
||
161 | * @param string $size |
||
162 | * @return HtmlButtongroups |
||
163 | */ |
||
164 | public function htmlButtongroups($identifier, $values=array(), $cssStyle=NULL, $size=NULL) { |
||
167 | |||
168 | /** |
||
169 | * Return a new Bootstrap Html Dropdown |
||
170 | * @param string $identifier |
||
171 | * @param array $items |
||
172 | * @param string $cssStyle |
||
173 | * @param string $size |
||
174 | * @return HtmlDropdown |
||
175 | */ |
||
176 | public function htmlDropdown($identifier, $value="", $items=array(), $cssStyle=NULL, $size=NULL) { |
||
179 | |||
180 | /** |
||
181 | * Return a new Bootstrap Html Dropdown |
||
182 | * @param string $identifier |
||
183 | * @param array $elements |
||
184 | * @param string $cssStyle |
||
185 | * @param string $size |
||
186 | * @return HtmlButtontoolbar |
||
187 | */ |
||
188 | public function htmlButtontoolbar($identifier, $elements=array(), $cssStyle=NULL, $size=NULL) { |
||
191 | |||
192 | /** |
||
193 | * Return a new Bootstrap Html Navbar |
||
194 | * @param string $identifier |
||
195 | * @param string $brand |
||
196 | * @param string $brandHref |
||
197 | * @return HtmlNavbar |
||
198 | */ |
||
199 | public function htmlNavbar($identifier, $brand="Brand", $brandHref="#") { |
||
202 | |||
203 | /** |
||
204 | * Return a new Bootstrap Html Progressbar |
||
205 | * @param string $identifier |
||
206 | * @param string $value |
||
207 | * @param string $max |
||
208 | * @param string $min |
||
209 | * @return HtmlProgressbar |
||
210 | */ |
||
211 | public function htmlProgressbar($identifier, $style="info", $value=0, $max=100, $min=0) { |
||
214 | |||
215 | /** |
||
216 | * Return a new Bootstrap Html Panel |
||
217 | * @param string $identifier the Html identifier of the element |
||
218 | * @param mixed $content the panel content (string or HtmlComponent) |
||
219 | * @param string $header the header |
||
220 | * @param string $footer the footer |
||
221 | * @return HtmlPanel |
||
222 | */ |
||
223 | public function htmlPanel($identifier, $content=NULL, $header=NULL, $footer=NULL) { |
||
226 | |||
227 | /** |
||
228 | * Return a new Bootstrap Html Alert |
||
229 | * @param string $identifier |
||
230 | * @param string $message |
||
231 | * @param string $cssStyle |
||
232 | * @return HtmlAlert |
||
233 | */ |
||
234 | public function htmlAlert($identifier, $message=NULL, $cssStyle="alert-warning") { |
||
237 | |||
238 | /** |
||
239 | * Return a new Bootstrap Accordion |
||
240 | * @param string $identifier |
||
241 | * @return HtmlAccordion |
||
242 | */ |
||
243 | public function htmlAccordion($identifier) { |
||
246 | |||
247 | /** |
||
248 | * Return a new Bootstrap Html Carousel |
||
249 | * @param string $identifier |
||
250 | * @param array $images [(src=>"",alt=>"",caption=>"",description=>""),...] |
||
251 | * @return HtmlCarousel |
||
252 | */ |
||
253 | public function htmlCarousel($identifier, $images=NULL) { |
||
256 | |||
257 | /** |
||
258 | * Return a new Bootstrap Html tabs |
||
259 | * @param string $identifier |
||
260 | * @return HtmlTabs |
||
261 | */ |
||
262 | public function htmlTabs($identifier) { |
||
265 | /** |
||
266 | * Return a new Bootstrap Html listGroup |
||
267 | * @param string $identifier |
||
268 | * @param array $items array of items to add |
||
269 | * @param string $tagName container tagName |
||
270 | * @return HtmlListgroup |
||
271 | */ |
||
272 | public function htmlListgroup($identifier,$items=array(),$tagName="ul"){ |
||
277 | /** |
||
278 | * Return a new Bootstrap Html modal dialog |
||
279 | * @param string $identifier |
||
280 | * @param string $title |
||
281 | * @param string $content |
||
282 | * @param array $buttonCaptions |
||
283 | * @return HtmlModal |
||
284 | */ |
||
285 | public function htmlModal($identifier, $title="", $content="", $buttonCaptions=array()) { |
||
288 | |||
289 | /** |
||
290 | * Return a new Bootstrap Html SplitButton |
||
291 | * @param string $identifier |
||
292 | * @param string $value |
||
293 | * @param array $items |
||
294 | * @param string $cssStyle |
||
295 | * @param string $onClick |
||
296 | * @return HtmlSplitbutton |
||
297 | */ |
||
298 | public function htmlSplitbutton($identifier,$value="", $items=array(), $cssStyle="btn-default", $onClick=NULL) { |
||
301 | |||
302 | /** |
||
303 | * Return a new Bootstrap Html InputGroup |
||
304 | * @param string $identifier |
||
305 | * @return HtmlInputgroup |
||
306 | */ |
||
307 | public function htmlInputgroup($identifier){ |
||
310 | |||
311 | /** |
||
312 | * Return a new Bootstrap Html Breadcrumbs |
||
313 | * @param string $identifier |
||
314 | * @param array $elements |
||
315 | * @param boolean $autoActive sets the last element's class to <b>active</b> if true. default : true |
||
316 | * @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()} |
||
317 | * @return HtmlBreadcrumbs |
||
318 | */ |
||
319 | public function htmlBreadcrumbs($identifier,$elements=array(),$autoActive=true,$hrefFunction=NULL){ |
||
322 | |||
323 | /** |
||
324 | * Return a new Bootstrap Html Pagination |
||
325 | * @see http://getbootstrap.com/components/#pagination |
||
326 | * @param string $identifier |
||
327 | * @param int $from default : 1 |
||
328 | * @param int $to default : 1 |
||
329 | * @param int $active The active page |
||
330 | * @return HtmlPagination |
||
331 | */ |
||
332 | public function htmlPagination($identifier,$from=1,$to=1,$active=NULL,$countVisible=NULL){ |
||
335 | |||
336 | /** |
||
337 | * Return a new Bootstrap Html Grid system |
||
338 | * @see http://getbootstrap.com/css/#grid |
||
339 | * @param string $identifier |
||
340 | * @param int $numRows |
||
341 | * @return HtmlGridSystem |
||
342 | */ |
||
343 | public function htmlGridSystem($identifier,$numRows=1){ |
||
346 | } |