@@ -10,6 +10,10 @@ discard block |
||
10 | 10 | |
11 | 11 | class HtmlLabel extends HtmlSemDoubleElement { |
12 | 12 | use LabeledIconTrait; |
13 | + |
|
14 | + /** |
|
15 | + * @param string $icon |
|
16 | + */ |
|
13 | 17 | public function __construct($identifier,$caption="",$icon=NULL,$tagName="div") { |
14 | 18 | parent::__construct($identifier,$tagName,"ui label"); |
15 | 19 | $this->content=$caption; |
@@ -18,7 +22,6 @@ discard block |
||
18 | 22 | } |
19 | 23 | |
20 | 24 | /** |
21 | - * @param string $side |
|
22 | 25 | * @return \Ajax\semantic\html\elements\HtmlLabel |
23 | 26 | */ |
24 | 27 | public function setPointing($value=Direction::NONE){ |
@@ -84,6 +84,9 @@ discard block |
||
84 | 84 | return $this; |
85 | 85 | } |
86 | 86 | |
87 | + /** |
|
88 | + * @param integer $index |
|
89 | + */ |
|
87 | 90 | public function removeItem($index){ |
88 | 91 | return array_splice($this->content, $index, 1); |
89 | 92 | } |
@@ -99,6 +102,9 @@ discard block |
||
99 | 102 | return $this->addItem($function($object)); |
100 | 103 | } |
101 | 104 | |
105 | + /** |
|
106 | + * @param \Closure $callBack |
|
107 | + */ |
|
102 | 108 | public function apply($callBack){ |
103 | 109 | foreach ($this->content as $item){ |
104 | 110 | $callBack($item); |
@@ -20,6 +20,9 @@ |
||
20 | 20 | protected $_tabsType="tabs"; |
21 | 21 | protected $stacked=""; |
22 | 22 | |
23 | + /** |
|
24 | + * @param string $identifier |
|
25 | + */ |
|
23 | 26 | public function __construct($identifier, $tagName="ul") { |
24 | 27 | parent::__construct($identifier, $tagName); |
25 | 28 | $this->_template="<%tagName% %properties%>%tabs%</%tagName%>%content%"; |
@@ -4,6 +4,9 @@ |
||
4 | 4 | |
5 | 5 | trait HtmlLinkTrait { |
6 | 6 | |
7 | + /** |
|
8 | + * @param string $value |
|
9 | + */ |
|
7 | 10 | public function setHref($value) { |
8 | 11 | $this->setProperty("href", $value); |
9 | 12 | } |
@@ -23,8 +23,6 @@ |
||
23 | 23 | |
24 | 24 | /** |
25 | 25 | * @param string $identifier |
26 | - * @param int $rowCount |
|
27 | - * @param int $colCount |
|
28 | 26 | */ |
29 | 27 | public function htmlRating($identifier, $value, $max,$icon=""){ |
30 | 28 | return $this->addHtmlComponent(new HtmlRating($identifier, $value, $max,$icon)); |
@@ -6,6 +6,9 @@ |
||
6 | 6 | |
7 | 7 | trait CheckboxTrait { |
8 | 8 | |
9 | + /** |
|
10 | + * @param string $name |
|
11 | + */ |
|
9 | 12 | public abstract function addToPropertyCtrl($name, $value, $typeCtrl); |
10 | 13 | |
11 | 14 | public function setType($checkboxType) { |
@@ -141,22 +141,36 @@ discard block |
||
141 | 141 | return $this; |
142 | 142 | } |
143 | 143 | |
144 | + /** |
|
145 | + * @param string $name |
|
146 | + * @param string $value |
|
147 | + */ |
|
144 | 148 | protected function removePropertyValue($name, $value) { |
145 | 149 | $this->properties[$name]=\str_replace($value, "", $this->properties[$name]); |
146 | 150 | return $this; |
147 | 151 | } |
148 | 152 | |
153 | + /** |
|
154 | + * @param string $name |
|
155 | + */ |
|
149 | 156 | protected function removePropertyValues($name, $values) { |
150 | 157 | $this->removeOldValues($this->properties[$name], $values); |
151 | 158 | return $this; |
152 | 159 | } |
153 | 160 | |
161 | + /** |
|
162 | + * @param string $name |
|
163 | + */ |
|
154 | 164 | protected function removeProperty($name) { |
155 | 165 | if (\array_key_exists($name, $this->properties)) |
156 | 166 | unset($this->properties[$name]); |
157 | 167 | return $this; |
158 | 168 | } |
159 | 169 | |
170 | + /** |
|
171 | + * @param string $name |
|
172 | + * @param string[] $typeCtrl |
|
173 | + */ |
|
160 | 174 | protected function addToMemberCtrl(&$name, $value, $typeCtrl, $separator=" ") { |
161 | 175 | if ($this->ctrl($name, $value, $typeCtrl) === true) { |
162 | 176 | if (is_array($typeCtrl)) { |
@@ -181,6 +195,9 @@ discard block |
||
181 | 195 | return $this->addToProperty($name, $value); |
182 | 196 | } |
183 | 197 | |
198 | + /** |
|
199 | + * @param string $name |
|
200 | + */ |
|
184 | 201 | public function addToPropertyCtrl($name, $value, $typeCtrl) { |
185 | 202 | return $this->addToPropertyUnique($name, $value, $typeCtrl); |
186 | 203 | } |
@@ -321,6 +338,9 @@ discard block |
||
321 | 338 | } |
322 | 339 | } |
323 | 340 | |
341 | + /** |
|
342 | + * @param string $operation |
|
343 | + */ |
|
324 | 344 | public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) { |
325 | 345 | $params=array ("url" => $url,"responseElement" => $responseElement ); |
326 | 346 | $params=array_merge($params, $parameters); |
@@ -328,14 +348,23 @@ discard block |
||
328 | 348 | return $this; |
329 | 349 | } |
330 | 350 | |
351 | + /** |
|
352 | + * @param string $event |
|
353 | + */ |
|
331 | 354 | public function getOn($event, $url, $responseElement="", $parameters=array()) { |
332 | 355 | return $this->_ajaxOn("get", $event, $url, $responseElement, $parameters); |
333 | 356 | } |
334 | 357 | |
358 | + /** |
|
359 | + * @param string $url |
|
360 | + */ |
|
335 | 361 | public function getOnClick($url, $responseElement="", $parameters=array()) { |
336 | 362 | return $this->getOn("click", $url, $responseElement, $parameters); |
337 | 363 | } |
338 | 364 | |
365 | + /** |
|
366 | + * @param string $event |
|
367 | + */ |
|
339 | 368 | public function postOn($event, $url, $params="{}", $responseElement="", $parameters=array()) { |
340 | 369 | $parameters["params"]=$params; |
341 | 370 | return $this->_ajaxOn("post", $event, $url, $responseElement, $parameters); |
@@ -345,6 +374,9 @@ discard block |
||
345 | 374 | return $this->postOn("click", $url, $params, $responseElement, $parameters); |
346 | 375 | } |
347 | 376 | |
377 | + /** |
|
378 | + * @param string $event |
|
379 | + */ |
|
348 | 380 | public function postFormOn($event, $url, $form, $responseElement="", $parameters=array()) { |
349 | 381 | $parameters["form"]=$form; |
350 | 382 | return $this->_ajaxOn("postForm", $event, $url, $responseElement, $parameters); |
@@ -394,6 +426,9 @@ discard block |
||
394 | 426 | return $value; |
395 | 427 | } |
396 | 428 | |
429 | + /** |
|
430 | + * @param string $jqueryCall |
|
431 | + */ |
|
397 | 432 | public function jsDoJquery($jqueryCall, $param="") { |
398 | 433 | return "$('#" . $this->identifier . "')." . $jqueryCall . "(" . $this->_prep_value($param) . ");"; |
399 | 434 | } |
@@ -11,12 +11,24 @@ |
||
11 | 11 | protected $_states=[ ]; |
12 | 12 | protected $_baseClass; |
13 | 13 | |
14 | + /** |
|
15 | + * @param string $name |
|
16 | + */ |
|
14 | 17 | protected abstract function setPropertyCtrl($name, $value, $typeCtrl); |
15 | 18 | |
19 | + /** |
|
20 | + * @param string $name |
|
21 | + */ |
|
16 | 22 | protected abstract function addToPropertyCtrl($name, $value, $typeCtrl); |
17 | 23 | |
24 | + /** |
|
25 | + * @param string $name |
|
26 | + */ |
|
18 | 27 | protected abstract function addToPropertyCtrlCheck($name, $value, $typeCtrl); |
19 | 28 | |
29 | + /** |
|
30 | + * @param string $name |
|
31 | + */ |
|
20 | 32 | public abstract function addToProperty($name, $value, $separator=" "); |
21 | 33 | |
22 | 34 | public function addVariation($variation) { |
@@ -17,6 +17,11 @@ discard block |
||
17 | 17 | class HtmlTable extends HtmlSemDoubleElement { |
18 | 18 | private $_colCount; |
19 | 19 | |
20 | + /** |
|
21 | + * @param string $identifier |
|
22 | + * @param integer $rowCount |
|
23 | + * @param integer $colCount |
|
24 | + */ |
|
20 | 25 | public function __construct($identifier, $rowCount, $colCount) { |
21 | 26 | parent::__construct($identifier, "table", "ui table"); |
22 | 27 | $this->content=array (); |
@@ -146,6 +151,9 @@ discard block |
||
146 | 151 | return $this->colAlign($colIndex, "colLeft"); |
147 | 152 | } |
148 | 153 | |
154 | + /** |
|
155 | + * @param string $function |
|
156 | + */ |
|
149 | 157 | private function colAlign($colIndex, $function) { |
150 | 158 | if (\is_array($colIndex)) { |
151 | 159 | foreach ( $colIndex as $cIndex ) { |