@@ -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); |
@@ -69,6 +69,9 @@ discard block |
||
| 69 | 69 | return $tr; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | + /** |
|
| 73 | + * @param integer $value |
|
| 74 | + */ |
|
| 72 | 75 | public function newRow($value) { |
| 73 | 76 | return $this->createItem($value); |
| 74 | 77 | } |
@@ -102,7 +105,7 @@ discard block |
||
| 102 | 105 | /** |
| 103 | 106 | * |
| 104 | 107 | * @param int $index |
| 105 | - * @return \Ajax\semantic\html\content\HtmlTR |
|
| 108 | + * @return \Ajax\common\html\HtmlDoubleElement |
|
| 106 | 109 | */ |
| 107 | 110 | public function getRow($index) { |
| 108 | 111 | return $this->getItem($index); |
@@ -146,6 +149,9 @@ discard block |
||
| 146 | 149 | return $this; |
| 147 | 150 | } |
| 148 | 151 | |
| 152 | + /** |
|
| 153 | + * @param integer $colIndex |
|
| 154 | + */ |
|
| 149 | 155 | public function setColValues($colIndex, $values=array()) { |
| 150 | 156 | $count=$this->count(); |
| 151 | 157 | if (\is_array($values) === false) { |
@@ -166,6 +172,9 @@ discard block |
||
| 166 | 172 | return $this; |
| 167 | 173 | } |
| 168 | 174 | |
| 175 | + /** |
|
| 176 | + * @param integer $rowIndex |
|
| 177 | + */ |
|
| 169 | 178 | public function setRowValues($rowIndex, $values=array()) { |
| 170 | 179 | $count=$this->count(); |
| 171 | 180 | if (\is_array($values) === false) { |
@@ -175,6 +184,9 @@ discard block |
||
| 175 | 184 | return $this; |
| 176 | 185 | } |
| 177 | 186 | |
| 187 | + /** |
|
| 188 | + * @param string $function |
|
| 189 | + */ |
|
| 178 | 190 | private function colAlign($colIndex, $function) { |
| 179 | 191 | $count=$this->count(); |
| 180 | 192 | for($i=0; $i < $count; $i++) { |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | /** |
| 50 | 50 | * Insert an item at a position |
| 51 | 51 | * @param mixed $item |
| 52 | - * @param number $position |
|
| 52 | + * @param integer $position |
|
| 53 | 53 | * @return \Ajax\semantic\html\content\HtmlDropdownItem|unknown |
| 54 | 54 | */ |
| 55 | 55 | public function insertItem($item,$position=0){ |
@@ -240,6 +240,9 @@ discard block |
||
| 240 | 240 | return $this->addToPropertyCtrl("class", $value." pointing",Direction::getConstantValues("pointing")); |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | + /** |
|
| 244 | + * @param string $value |
|
| 245 | + */ |
|
| 243 | 246 | public function setValue($value){ |
| 244 | 247 | $this->value=$value; |
| 245 | 248 | return $this; |
@@ -274,6 +277,9 @@ discard block |
||
| 274 | 277 | return $this->addToPropertyCtrl("class", "compact", array("compact")); |
| 275 | 278 | } |
| 276 | 279 | |
| 280 | + /** |
|
| 281 | + * @param string $action |
|
| 282 | + */ |
|
| 277 | 283 | public function setAction($action){ |
| 278 | 284 | $this->_params["action"]=$action; |
| 279 | 285 | } |
@@ -83,16 +83,26 @@ |
||
| 83 | 83 | return $this; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | + /** |
|
| 87 | + * @param \Closure $field |
|
| 88 | + */ |
|
| 86 | 89 | public function addField($field){ |
| 87 | 90 | $this->_instanceViewer->addField($field); |
| 88 | 91 | return $this; |
| 89 | 92 | } |
| 90 | 93 | |
| 94 | + /** |
|
| 95 | + * @param integer $index |
|
| 96 | + * @param \Closure $field |
|
| 97 | + */ |
|
| 91 | 98 | public function insertField($index,$field){ |
| 92 | 99 | $this->_instanceViewer->insertField($index, $field); |
| 93 | 100 | return $this; |
| 94 | 101 | } |
| 95 | 102 | |
| 103 | + /** |
|
| 104 | + * @param \Closure $field |
|
| 105 | + */ |
|
| 96 | 106 | public function insertInField($index,$field){ |
| 97 | 107 | $this->_instanceViewer->insertInField($index, $field); |
| 98 | 108 | return $this; |
@@ -39,6 +39,10 @@ discard block |
||
| 39 | 39 | parent::run($js); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | + /** |
|
| 43 | + * @param string $identifier |
|
| 44 | + * @param string $model |
|
| 45 | + */ |
|
| 42 | 46 | public function __construct($identifier,$model,$modelInstance=NULL) { |
| 43 | 47 | parent::__construct($identifier, $model,$modelInstance); |
| 44 | 48 | $this->_instanceViewer=new InstanceViewer(); |
@@ -141,6 +145,9 @@ discard block |
||
| 141 | 145 | return $this; |
| 142 | 146 | } |
| 143 | 147 | |
| 148 | + /** |
|
| 149 | + * @param PositionInTable $part |
|
| 150 | + */ |
|
| 144 | 151 | private function addToolbarRow($part,$table,$captions){ |
| 145 | 152 | $row=$table->getPart($part)->addRow(\sizeof($captions)); |
| 146 | 153 | $row->mergeCol(); |
@@ -180,16 +187,17 @@ discard block |
||
| 180 | 187 | /** |
| 181 | 188 | * @param string $caption |
| 182 | 189 | * @param callable $callback |
| 183 | - * @return callable |
|
| 190 | + * @return \Closure |
|
| 184 | 191 | */ |
| 185 | 192 | private function getFieldButtonCallable($caption,$callback=null){ |
| 186 | 193 | return $this->getCallable("getFieldButton",[$caption],$callback); |
| 187 | 194 | } |
| 188 | 195 | |
| 189 | 196 | /** |
| 190 | - * @param mixed $object |
|
| 191 | 197 | * @param callable $callback |
| 192 | - * @return callable |
|
| 198 | + * @param string $thisCallback |
|
| 199 | + * @param string[] $parameters |
|
| 200 | + * @return \Closure |
|
| 193 | 201 | */ |
| 194 | 202 | private function getCallable($thisCallback,$parameters,$callback=null){ |
| 195 | 203 | $result=function($instance) use($thisCallback,$parameters,$callback){ |
@@ -250,11 +258,19 @@ discard block |
||
| 250 | 258 | return $this; |
| 251 | 259 | } |
| 252 | 260 | |
| 261 | + /** |
|
| 262 | + * @param string $icon |
|
| 263 | + * @param string $class |
|
| 264 | + */ |
|
| 253 | 265 | private function addDefaultButton($icon,$class=null,$callback=null){ |
| 254 | 266 | $this->addField($this->getCallable("getDefaultButton",[$icon,$class],$callback)); |
| 255 | 267 | return $this; |
| 256 | 268 | } |
| 257 | 269 | |
| 270 | + /** |
|
| 271 | + * @param string $icon |
|
| 272 | + * @param string $class |
|
| 273 | + */ |
|
| 258 | 274 | private function insertDefaultButtonIn($index,$icon,$class=null,$callback=null){ |
| 259 | 275 | $this->insertInField($index,$this->getCallable("getDefaultButton",[$icon,$class],$callback)); |
| 260 | 276 | return $this; |
@@ -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); |