@@ -13,6 +13,9 @@ |
||
13 | 13 | */ |
14 | 14 | class HtmlIconGroups extends HtmlSemCollection { |
15 | 15 | |
16 | + /** |
|
17 | + * @param string $identifier |
|
18 | + */ |
|
16 | 19 | public function __construct($identifier, $icons=array(), $size="") { |
17 | 20 | parent::__construct($identifier, "i", "icons"); |
18 | 21 | $this->addItems($icons); |
@@ -18,6 +18,10 @@ discard block |
||
18 | 18 | trait FieldAsTrait{ |
19 | 19 | |
20 | 20 | abstract protected function _getFieldIdentifier($prefix); |
21 | + |
|
22 | + /** |
|
23 | + * @param \Closure $callback |
|
24 | + */ |
|
21 | 25 | abstract public function setValueFunction($index,$callback); |
22 | 26 | |
23 | 27 | private function _getLabelField($caption,$icon=NULL){ |
@@ -27,6 +31,10 @@ discard block |
||
27 | 31 | |
28 | 32 | protected function _addRules($element,$attributes){} |
29 | 33 | |
34 | + /** |
|
35 | + * @param \Closure $elementCallback |
|
36 | + * @param string $prefix |
|
37 | + */ |
|
30 | 38 | protected function _fieldAs($elementCallback,$index,$attributes=NULL,$prefix=null){ |
31 | 39 | $this->setValueFunction($index,function($value)use ($index,&$attributes,$elementCallback,$prefix){ |
32 | 40 | $name=$this->_instanceViewer->getCaption($index)."[]"; |
@@ -9,9 +9,16 @@ |
||
9 | 9 | |
10 | 10 | trait FieldTrait { |
11 | 11 | |
12 | + /** |
|
13 | + * @param string $name |
|
14 | + */ |
|
12 | 15 | abstract public function addToProperty($name, $value, $separator=" "); |
13 | 16 | abstract public function addLabel($caption, $style="label-default", $leftSeparator=" "); |
14 | 17 | abstract public function addContent($content,$before=false); |
18 | + |
|
19 | + /** |
|
20 | + * @return string |
|
21 | + */ |
|
15 | 22 | abstract public function getField(); |
16 | 23 | public function setFocus() { |
17 | 24 | $this->getField()->addToProperty("class", State::FOCUS); |
@@ -18,7 +18,14 @@ discard block |
||
18 | 18 | |
19 | 19 | trait FormFieldAsTrait{ |
20 | 20 | |
21 | + /** |
|
22 | + * @param string $prefix |
|
23 | + */ |
|
21 | 24 | abstract protected function _getFieldIdentifier($prefix); |
25 | + |
|
26 | + /** |
|
27 | + * @param \Closure $callback |
|
28 | + */ |
|
22 | 29 | abstract public function setValueFunction($index,$callback); |
23 | 30 | |
24 | 31 | private function _getLabelField($caption,$icon=NULL){ |
@@ -42,6 +49,9 @@ discard block |
||
42 | 49 | $element->fromArray($attributes); |
43 | 50 | } |
44 | 51 | |
52 | + /** |
|
53 | + * @param HtmlFormField $element |
|
54 | + */ |
|
45 | 55 | protected function _addRules($element,$attributes){ |
46 | 56 | if(isset($attributes["rules"])){ |
47 | 57 | $rules=$attributes["rules"]; |
@@ -53,6 +63,10 @@ discard block |
||
53 | 63 | } |
54 | 64 | } |
55 | 65 | |
66 | + /** |
|
67 | + * @param \Closure $elementCallback |
|
68 | + * @param string $identifier |
|
69 | + */ |
|
56 | 70 | protected function _fieldAs($elementCallback,$index,$attributes=NULL,$identifier=null){ |
57 | 71 | $this->setValueFunction($index,function($value) use ($index,&$attributes,$elementCallback){ |
58 | 72 | $caption=$this->_instanceViewer->getCaption($index); |
@@ -23,6 +23,10 @@ discard block |
||
23 | 23 | private $_footer; |
24 | 24 | private $_afterCompileEvents; |
25 | 25 | |
26 | + /** |
|
27 | + * @param integer $rowCount |
|
28 | + * @param integer $colCount |
|
29 | + */ |
|
26 | 30 | public function __construct($identifier, $rowCount, $colCount) { |
27 | 31 | parent::__construct($identifier, "table", "ui table"); |
28 | 32 | $this->content=array (); |
@@ -112,7 +116,7 @@ discard block |
||
112 | 116 | /** |
113 | 117 | * Retuns the row at $rowIndex |
114 | 118 | * @param int $rowIndex |
115 | - * @return \Ajax\semantic\html\content\HtmlTR |
|
119 | + * @return \Ajax\common\html\HtmlDoubleElement |
|
116 | 120 | */ |
117 | 121 | public function getRow($rowIndex) { |
118 | 122 | return $this->getBody()->getRow($rowIndex); |
@@ -154,7 +158,7 @@ discard block |
||
154 | 158 | * Sets values to the col at index $colIndex |
155 | 159 | * @param int $colIndex |
156 | 160 | * @param array $values |
157 | - * @return \Ajax\semantic\html\collections\HtmlTable |
|
161 | + * @return HtmlTable |
|
158 | 162 | */ |
159 | 163 | public function setColValues($colIndex, $values=array()) { |
160 | 164 | $this->getBody()->setColValues($colIndex, $values); |
@@ -165,7 +169,7 @@ discard block |
||
165 | 169 | * Sets values to the row at index $rowIndex |
166 | 170 | * @param int $rowIndex |
167 | 171 | * @param array $values |
168 | - * @return \Ajax\semantic\html\collections\HtmlTable |
|
172 | + * @return HtmlTable |
|
169 | 173 | */ |
170 | 174 | public function setRowValues($rowIndex, $values=array()) { |
171 | 175 | $this->getBody()->setRowValues($rowIndex, $values); |
@@ -188,6 +192,9 @@ discard block |
||
188 | 192 | return $this->colAlign($colIndex, "colLeft"); |
189 | 193 | } |
190 | 194 | |
195 | + /** |
|
196 | + * @param string $function |
|
197 | + */ |
|
191 | 198 | private function colAlign($colIndex, $function) { |
192 | 199 | if (\is_array($colIndex)) { |
193 | 200 | foreach ( $colIndex as $cIndex ) { |
@@ -263,7 +270,7 @@ discard block |
||
263 | 270 | |
264 | 271 | /** |
265 | 272 | * @param array $parts |
266 | - * @return \Ajax\semantic\html\collections\HtmlTable |
|
273 | + * @return HtmlTable |
|
267 | 274 | */ |
268 | 275 | public function setCompileParts($parts=["tbody"]) { |
269 | 276 | $this->_compileParts=$parts; |
@@ -286,7 +293,7 @@ discard block |
||
286 | 293 | * The callback function called after the insertion of each row when fromDatabaseObjects is called |
287 | 294 | * callback function takes the parameters $row : the row inserted and $object: the instance of model used |
288 | 295 | * @param callable $callback |
289 | - * @return \Ajax\semantic\html\collections\HtmlTable |
|
296 | + * @return HtmlTable |
|
290 | 297 | */ |
291 | 298 | public function onNewRow($callback) { |
292 | 299 | $this->_afterCompileEvents["onNewRow"]=$callback; |