@@ -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; |
@@ -177,6 +177,9 @@ |
||
177 | 177 | return parent::contentAsString(); |
178 | 178 | } |
179 | 179 | |
180 | + /** |
|
181 | + * @param integer $index |
|
182 | + */ |
|
180 | 183 | public function getElement($index){ |
181 | 184 | return $this->content[$index]; |
182 | 185 | } |
@@ -124,6 +124,10 @@ discard block |
||
124 | 124 | return $this; |
125 | 125 | } |
126 | 126 | |
127 | + /** |
|
128 | + * @param string $name |
|
129 | + * @param string[] $typeCtrl |
|
130 | + */ |
|
127 | 131 | protected function setMemberCtrl(&$name, $value, $typeCtrl) { |
128 | 132 | if ($this->ctrl($name, $value, $typeCtrl) === true) { |
129 | 133 | return $name=$value; |
@@ -139,22 +143,35 @@ discard block |
||
139 | 143 | return $this; |
140 | 144 | } |
141 | 145 | |
146 | + /** |
|
147 | + * @param string $name |
|
148 | + */ |
|
142 | 149 | protected function removePropertyValue($name, $value) { |
143 | 150 | $this->properties[$name]=\str_replace($value, "", $this->properties[$name]); |
144 | 151 | return $this; |
145 | 152 | } |
146 | 153 | |
154 | + /** |
|
155 | + * @param string $name |
|
156 | + */ |
|
147 | 157 | protected function removePropertyValues($name, $values) { |
148 | 158 | $this->removeOldValues($this->properties[$name], $values); |
149 | 159 | return $this; |
150 | 160 | } |
151 | 161 | |
162 | + /** |
|
163 | + * @param string $name |
|
164 | + */ |
|
152 | 165 | public function removeProperty($name) { |
153 | 166 | if (\array_key_exists($name, $this->properties)) |
154 | 167 | unset($this->properties[$name]); |
155 | 168 | return $this; |
156 | 169 | } |
157 | 170 | |
171 | + /** |
|
172 | + * @param string $name |
|
173 | + * @param string[] $typeCtrl |
|
174 | + */ |
|
158 | 175 | protected function addToMemberCtrl(&$name, $value, $typeCtrl, $separator=" ") { |
159 | 176 | if ($this->ctrl($name, $value, $typeCtrl) === true) { |
160 | 177 | if (is_array($typeCtrl)) { |
@@ -165,6 +182,9 @@ discard block |
||
165 | 182 | return $this; |
166 | 183 | } |
167 | 184 | |
185 | + /** |
|
186 | + * @param string $name |
|
187 | + */ |
|
168 | 188 | protected function addToMember(&$name, $value, $separator=" ") { |
169 | 189 | $name=str_ireplace($value, "", $name) . $separator . $value; |
170 | 190 | return $this; |
@@ -179,6 +199,9 @@ discard block |
||
179 | 199 | return $this->addToProperty($name, $value); |
180 | 200 | } |
181 | 201 | |
202 | + /** |
|
203 | + * @param string $name |
|
204 | + */ |
|
182 | 205 | public function addToPropertyCtrl($name, $value, $typeCtrl) { |
183 | 206 | return $this->addToPropertyUnique($name, $value, $typeCtrl); |
184 | 207 | } |
@@ -283,6 +306,10 @@ discard block |
||
283 | 306 | return null; |
284 | 307 | } |
285 | 308 | |
309 | + /** |
|
310 | + * @param string $propertyName |
|
311 | + * @param string $value |
|
312 | + */ |
|
286 | 313 | protected function getElementByPropertyValue($propertyName,$value, $elements) { |
287 | 314 | if (is_array($elements)) { |
288 | 315 | $flag=false; |
@@ -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); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | /** |
64 | 64 | * Insert an item at a position |
65 | 65 | * @param mixed $item |
66 | - * @param number $position |
|
66 | + * @param integer $position |
|
67 | 67 | * @return \Ajax\semantic\html\content\HtmlDropdownItem|unknown |
68 | 68 | */ |
69 | 69 | public function insertItem($item,$position=0){ |
@@ -164,6 +164,9 @@ discard block |
||
164 | 164 | } |
165 | 165 | } |
166 | 166 | |
167 | + /** |
|
168 | + * @param integer $index |
|
169 | + */ |
|
167 | 170 | public function getItem($index){ |
168 | 171 | return $this->items[$index]; |
169 | 172 | } |
@@ -254,6 +257,9 @@ discard block |
||
254 | 257 | return $this->addToPropertyCtrl("class", $value." pointing",Direction::getConstantValues("pointing")); |
255 | 258 | } |
256 | 259 | |
260 | + /** |
|
261 | + * @param string $value |
|
262 | + */ |
|
257 | 263 | public function setValue($value){ |
258 | 264 | $this->value=$value; |
259 | 265 | return $this; |
@@ -288,6 +294,9 @@ discard block |
||
288 | 294 | return $this->addToPropertyCtrl("class", "compact", array("compact")); |
289 | 295 | } |
290 | 296 | |
297 | + /** |
|
298 | + * @param string $action |
|
299 | + */ |
|
291 | 300 | public function setAction($action){ |
292 | 301 | $this->_params["action"]=$action; |
293 | 302 | } |
@@ -16,18 +16,39 @@ |
||
16 | 16 | protected $_states=[ ]; |
17 | 17 | protected $_baseClass; |
18 | 18 | |
19 | + /** |
|
20 | + * @param string $name |
|
21 | + */ |
|
19 | 22 | abstract protected function setPropertyCtrl($name, $value, $typeCtrl); |
20 | 23 | |
24 | + /** |
|
25 | + * @param string $name |
|
26 | + */ |
|
21 | 27 | abstract protected function addToPropertyCtrl($name, $value, $typeCtrl); |
22 | 28 | |
29 | + /** |
|
30 | + * @param string $name |
|
31 | + */ |
|
23 | 32 | abstract protected function addToPropertyCtrlCheck($name, $value, $typeCtrl); |
24 | 33 | |
34 | + /** |
|
35 | + * @param string $name |
|
36 | + */ |
|
25 | 37 | abstract public function addToProperty($name, $value, $separator=" "); |
26 | 38 | |
39 | + /** |
|
40 | + * @param string $name |
|
41 | + */ |
|
27 | 42 | abstract public function setProperty($name, $value); |
28 | 43 | |
44 | + /** |
|
45 | + * @param HtmlIcon $content |
|
46 | + */ |
|
29 | 47 | abstract public function addContent($content,$before=false); |
30 | 48 | |
49 | + /** |
|
50 | + * @param string $jsCode |
|
51 | + */ |
|
31 | 52 | abstract public function onCreate($jsCode); |
32 | 53 | |
33 | 54 | public function addVariation($variation) { |
@@ -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); |