@@ -63,6 +63,9 @@ discard block |
||
63 | 63 | |
64 | 64 | |
65 | 65 | |
66 | + /** |
|
67 | + * @param string $op |
|
68 | + */ |
|
66 | 69 | protected function _generateBehavior($op,$params,JsUtils $js){ |
67 | 70 | if(isset($this->_urls[$op])){ |
68 | 71 | $params=\array_merge($params,["attr"=>"data-ajax"]); |
@@ -139,6 +142,9 @@ discard block |
||
139 | 142 | } |
140 | 143 | } |
141 | 144 | |
145 | + /** |
|
146 | + * @param string $checkedClass |
|
147 | + */ |
|
142 | 148 | protected function _generateRow($instance,&$table,$checkedClass=null){ |
143 | 149 | $this->_instanceViewer->setInstance($instance); |
144 | 150 | InstanceViewer::$index++; |
@@ -215,6 +221,9 @@ discard block |
||
215 | 221 | return $this; |
216 | 222 | } |
217 | 223 | |
224 | + /** |
|
225 | + * @param PositionInTable $part |
|
226 | + */ |
|
218 | 227 | private function addToolbarRow($part,$table,$captions){ |
219 | 228 | $hasPart=$table->hasPart($part); |
220 | 229 | if($hasPart){ |
@@ -254,7 +263,7 @@ discard block |
||
254 | 263 | * Paginates the DataTable element with a Semantic HtmlPaginationMenu component |
255 | 264 | * @param number $page the active page number |
256 | 265 | * @param number $total_rowcount the total number of items |
257 | - * @param number $items_per_page The number of items per page |
|
266 | + * @param integer $items_per_page The number of items per page |
|
258 | 267 | * @param number $pages_visibles The number of visible pages in the Pagination component |
259 | 268 | * @return DataTable |
260 | 269 | */ |
@@ -265,9 +274,9 @@ discard block |
||
265 | 274 | |
266 | 275 | /** |
267 | 276 | * Auto Paginates the DataTable element with a Semantic HtmlPaginationMenu component |
268 | - * @param number $page the active page number |
|
269 | - * @param number $items_per_page The number of items per page |
|
270 | - * @param number $pages_visibles The number of visible pages in the Pagination component |
|
277 | + * @param integer $page the active page number |
|
278 | + * @param integer $items_per_page The number of items per page |
|
279 | + * @param integer $pages_visibles The number of visible pages in the Pagination component |
|
271 | 280 | * @return DataTable |
272 | 281 | */ |
273 | 282 | public function autoPaginate($page=1,$items_per_page=10,$pages_visibles=4){ |
@@ -333,6 +342,9 @@ discard block |
||
333 | 342 | return $this; |
334 | 343 | } |
335 | 344 | |
345 | + /** |
|
346 | + * @return string |
|
347 | + */ |
|
336 | 348 | public function getRefreshSelector() { |
337 | 349 | if(isset($this->_refreshSelector)) |
338 | 350 | return $this->_refreshSelector; |
@@ -67,6 +67,9 @@ discard block |
||
67 | 67 | } |
68 | 68 | } |
69 | 69 | |
70 | + /** |
|
71 | + * @param HtmlForm $form |
|
72 | + */ |
|
70 | 73 | protected function _generateFields($form,$values,$headers,$sepFirst,$sepLast,$wrappers){ |
71 | 74 | $wrapper=null; |
72 | 75 | $fields=\array_slice($values, $sepFirst+1,$sepLast-$sepFirst); |
@@ -132,12 +135,20 @@ discard block |
||
132 | 135 | $this->content[$this->_toolbarPosition]=$this->_toolbar; |
133 | 136 | } |
134 | 137 | |
138 | + /** |
|
139 | + * @param integer $index |
|
140 | + * @param string $title |
|
141 | + */ |
|
135 | 142 | public function addDividerBefore($index,$title){ |
136 | 143 | $index=$this->_getIndex($index); |
137 | 144 | $this->_instanceViewer->addHeaderDividerBefore($index, $title); |
138 | 145 | return $this; |
139 | 146 | } |
140 | 147 | |
148 | + /** |
|
149 | + * @param string $index |
|
150 | + * @param string $contentAfter |
|
151 | + */ |
|
141 | 152 | public function addWrapper($index,$contentBefore,$contentAfter=null){ |
142 | 153 | $index=$this->_getIndex($index); |
143 | 154 | $this->_instanceViewer->addWrapper($index, $contentBefore,$contentAfter); |
@@ -62,6 +62,9 @@ discard block |
||
62 | 62 | return $tr; |
63 | 63 | } |
64 | 64 | |
65 | + /** |
|
66 | + * @param integer $value |
|
67 | + */ |
|
65 | 68 | public function newRow($value) { |
66 | 69 | return $this->createItem($value); |
67 | 70 | } |
@@ -160,6 +163,9 @@ discard block |
||
160 | 163 | return $this; |
161 | 164 | } |
162 | 165 | |
166 | + /** |
|
167 | + * @param integer $colIndex |
|
168 | + */ |
|
163 | 169 | public function setColValues($colIndex, $values=array()) { |
164 | 170 | $count=$this->count(); |
165 | 171 | if (!\is_array($values)) { |
@@ -180,6 +186,9 @@ discard block |
||
180 | 186 | return $this; |
181 | 187 | } |
182 | 188 | |
189 | + /** |
|
190 | + * @param integer $rowIndex |
|
191 | + */ |
|
183 | 192 | public function setRowValues($rowIndex, $values=array()) { |
184 | 193 | $count=$this->count(); |
185 | 194 | if (!\is_array($values)) { |
@@ -189,6 +198,9 @@ discard block |
||
189 | 198 | return $this; |
190 | 199 | } |
191 | 200 | |
201 | + /** |
|
202 | + * @param string $function |
|
203 | + */ |
|
192 | 204 | private function colAlign($colIndex, $function) { |
193 | 205 | $count=$this->count(); |
194 | 206 | for($i=0; $i < $count; $i++) { |
@@ -266,7 +278,7 @@ discard block |
||
266 | 278 | } |
267 | 279 | |
268 | 280 | /** |
269 | - * @param mixed $callback |
|
281 | + * @param callable $callback |
|
270 | 282 | * @param string $format |
271 | 283 | * @return HtmlTableContent |
272 | 284 | */ |
@@ -279,7 +291,7 @@ discard block |
||
279 | 291 | } |
280 | 292 | |
281 | 293 | /** |
282 | - * @param mixed $callback |
|
294 | + * @param callable $callback |
|
283 | 295 | * @param string $format |
284 | 296 | * @return HtmlTableContent |
285 | 297 | */ |
@@ -292,7 +304,7 @@ discard block |
||
292 | 304 | } |
293 | 305 | |
294 | 306 | /** |
295 | - * @param mixed $callback |
|
307 | + * @param callable $callback |
|
296 | 308 | * @return HtmlTableContent |
297 | 309 | */ |
298 | 310 | public function applyCells($callback) { |
@@ -304,7 +316,7 @@ discard block |
||
304 | 316 | } |
305 | 317 | |
306 | 318 | /** |
307 | - * @param mixed $callback |
|
319 | + * @param callable $callback |
|
308 | 320 | * @return HtmlTableContent |
309 | 321 | */ |
310 | 322 | public function applyRows($callback) { |
@@ -30,9 +30,17 @@ discard block |
||
30 | 30 | trait FieldAsTrait{ |
31 | 31 | |
32 | 32 | abstract protected function _getFieldIdentifier($prefix,$name=""); |
33 | + |
|
34 | + /** |
|
35 | + * @param \Closure $callback |
|
36 | + */ |
|
33 | 37 | abstract public function setValueFunction($index,$callback); |
34 | 38 | abstract protected function _getFieldName($index); |
35 | 39 | abstract protected function _getFieldCaption($index); |
40 | + |
|
41 | + /** |
|
42 | + * @param string $event |
|
43 | + */ |
|
36 | 44 | abstract protected function _buttonAsSubmit(BaseHtml &$button,$event,$url,$responseElement=NULL,$parameters=NULL); |
37 | 45 | |
38 | 46 | /** |
@@ -243,6 +251,9 @@ discard block |
||
243 | 251 | } |
244 | 252 | } |
245 | 253 | |
254 | + /** |
|
255 | + * @param integer $index |
|
256 | + */ |
|
246 | 257 | public function fieldAs($index,$type,$attributes=NULL){ |
247 | 258 | $method="fieldAs".\ucfirst($type); |
248 | 259 | if(\method_exists($this, $method)){ |