@@ -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)){ |
@@ -249,6 +249,9 @@ discard block |
||
249 | 249 | return $this; |
250 | 250 | } |
251 | 251 | |
252 | + /** |
|
253 | + * @param integer $index |
|
254 | + */ |
|
252 | 255 | public static function setIndex($index) { |
253 | 256 | self::$index=$index; |
254 | 257 | } |
@@ -307,7 +310,7 @@ discard block |
||
307 | 310 | * The $callback function can take the following arguments : $field=>the compiled field, $instance : the active instance of the object, $index: the field position |
308 | 311 | * @param int $index postion of the compiled field |
309 | 312 | * @param callable $callback function called after the field compilation |
310 | - * @return \Ajax\semantic\widgets\datatable\InstanceViewer |
|
313 | + * @return InstanceViewer |
|
311 | 314 | */ |
312 | 315 | public function afterCompile($index,$callback){ |
313 | 316 | $this->afterCompile[$index]=$callback; |
@@ -63,6 +63,10 @@ discard block |
||
63 | 63 | |
64 | 64 | |
65 | 65 | |
66 | + /** |
|
67 | + * @param string $name |
|
68 | + * @param string[] $typeCtrl |
|
69 | + */ |
|
66 | 70 | protected function setMemberCtrl(&$name, $value, $typeCtrl) { |
67 | 71 | if ($this->ctrl($name, $value, $typeCtrl) === true) { |
68 | 72 | return $name=$value; |
@@ -80,6 +84,10 @@ discard block |
||
80 | 84 | |
81 | 85 | |
82 | 86 | |
87 | + /** |
|
88 | + * @param string $name |
|
89 | + * @param string[] $typeCtrl |
|
90 | + */ |
|
83 | 91 | protected function addToMemberCtrl(&$name, $value, $typeCtrl, $separator=" ") { |
84 | 92 | if ($this->ctrl($name, $value, $typeCtrl) === true) { |
85 | 93 | if (\is_array($typeCtrl)) { |
@@ -90,6 +98,9 @@ discard block |
||
90 | 98 | return $this; |
91 | 99 | } |
92 | 100 | |
101 | + /** |
|
102 | + * @param string $name |
|
103 | + */ |
|
93 | 104 | protected function addToMember(&$name, $value, $separator=" ") { |
94 | 105 | $name=str_ireplace($value, "", $name) . $separator . $value; |
95 | 106 | return $this; |
@@ -102,6 +113,9 @@ discard block |
||
102 | 113 | $oldValue=trim($oldValue); |
103 | 114 | } |
104 | 115 | |
116 | + /** |
|
117 | + * @param \Closure $callback |
|
118 | + */ |
|
105 | 119 | protected function _getElementBy($callback,$elements){ |
106 | 120 | if (\is_array($elements)) { |
107 | 121 | $elements=\array_values($elements); |
@@ -15,6 +15,10 @@ |
||
15 | 15 | */ |
16 | 16 | class HtmlButtonGroups extends HtmlSemCollection { |
17 | 17 | protected $_dropdown; |
18 | + |
|
19 | + /** |
|
20 | + * @param string $identifier |
|
21 | + */ |
|
18 | 22 | public function __construct($identifier, $elements=array(), $asIcons=false) { |
19 | 23 | parent::__construct($identifier, "div", "ui buttons"); |
20 | 24 | if ($asIcons === true) |