@@ -28,9 +28,17 @@ discard block |
||
28 | 28 | trait FieldAsTrait{ |
29 | 29 | |
30 | 30 | abstract protected function _getFieldIdentifier($prefix,$name=""); |
31 | + |
|
32 | + /** |
|
33 | + * @param \Closure $callback |
|
34 | + */ |
|
31 | 35 | abstract public function setValueFunction($index,$callback); |
32 | 36 | abstract protected function _getFieldName($index); |
33 | 37 | abstract protected function _getFieldCaption($index); |
38 | + |
|
39 | + /** |
|
40 | + * @param string $event |
|
41 | + */ |
|
34 | 42 | abstract protected function _buttonAsSubmit(HtmlButton &$button,$event,$url,$responseElement=NULL,$parameters=NULL); |
35 | 43 | |
36 | 44 | /** |
@@ -70,6 +78,9 @@ discard block |
||
70 | 78 | } |
71 | 79 | } |
72 | 80 | |
81 | + /** |
|
82 | + * @param HtmlFormInput $field |
|
83 | + */ |
|
73 | 84 | protected function _prepareFormFields(&$field,$name,&$attributes){ |
74 | 85 | $field->setName($name); |
75 | 86 | $this->_addRules($field, $attributes); |
@@ -235,6 +246,9 @@ discard block |
||
235 | 246 | } |
236 | 247 | } |
237 | 248 | |
249 | + /** |
|
250 | + * @param integer $index |
|
251 | + */ |
|
238 | 252 | public function fieldAs($index,$type,$attributes=NULL){ |
239 | 253 | $method="fieldAs".\ucfirst($type); |
240 | 254 | if(\method_exists($this, $method)){ |
@@ -15,6 +15,7 @@ |
||
15 | 15 | * {@inheritdoc} |
16 | 16 | * |
17 | 17 | * @see \Ajax\semantic\widgets\dataform\DataForm::__construct() |
18 | + * @param string $identifier |
|
18 | 19 | */ |
19 | 20 | public function __construct($identifier,$modelInstance=null,$fieldsOrder,$fieldsDefinition,$fields=[],$captions=[],$separators=[]) { |
20 | 21 | if(!isset($modelInstance)){ |
@@ -128,12 +128,20 @@ |
||
128 | 128 | $this->content[$this->_toolbarPosition]=$this->_toolbar; |
129 | 129 | } |
130 | 130 | |
131 | + /** |
|
132 | + * @param integer $index |
|
133 | + * @param string $title |
|
134 | + */ |
|
131 | 135 | public function addDividerBefore($index,$title){ |
132 | 136 | $index=$this->_getIndex($index); |
133 | 137 | $this->_instanceViewer->addHeaderDividerBefore($index, $title); |
134 | 138 | return $this; |
135 | 139 | } |
136 | 140 | |
141 | + /** |
|
142 | + * @param string $index |
|
143 | + * @param string $contentAfter |
|
144 | + */ |
|
137 | 145 | public function addWrapper($index,$contentBefore,$contentAfter=null){ |
138 | 146 | $index=$this->_getIndex($index); |
139 | 147 | $this->_instanceViewer->addWrapper($index, $contentBefore,$contentAfter); |
@@ -33,6 +33,10 @@ discard block |
||
33 | 33 | protected $_refreshSelector; |
34 | 34 | |
35 | 35 | |
36 | + /** |
|
37 | + * @param string $identifier |
|
38 | + * @param string $model |
|
39 | + */ |
|
36 | 40 | public function __construct($identifier,$model,$modelInstance=NULL) { |
37 | 41 | parent::__construct($identifier, $model,$modelInstance); |
38 | 42 | $this->_init(new InstanceViewer($identifier), "table", new HtmlTable($identifier, 0,0), false); |
@@ -56,6 +60,9 @@ discard block |
||
56 | 60 | |
57 | 61 | |
58 | 62 | |
63 | + /** |
|
64 | + * @param string $op |
|
65 | + */ |
|
59 | 66 | protected function _generateBehavior($op,$params,JsUtils $js){ |
60 | 67 | if(isset($this->_urls[$op])){ |
61 | 68 | $params=\array_merge($params,["attr"=>"data-ajax"]); |
@@ -185,6 +192,9 @@ discard block |
||
185 | 192 | return $this; |
186 | 193 | } |
187 | 194 | |
195 | + /** |
|
196 | + * @param PositionInTable $part |
|
197 | + */ |
|
188 | 198 | private function addToolbarRow($part,$table,$captions){ |
189 | 199 | $hasPart=$table->hasPart($part); |
190 | 200 | if($hasPart){ |
@@ -224,8 +234,8 @@ discard block |
||
224 | 234 | * Paginates the DataTable element with a Semantic HtmlPaginationMenu component |
225 | 235 | * @param number $page the active page number |
226 | 236 | * @param number $total_rowcount the total number of items |
227 | - * @param number $items_per_page The number of items per page |
|
228 | - * @param number $pages_visibles The number of visible pages in the Pagination component |
|
237 | + * @param integer $items_per_page The number of items per page |
|
238 | + * @param integer $pages_visibles The number of visible pages in the Pagination component |
|
229 | 239 | * @return DataTable |
230 | 240 | */ |
231 | 241 | public function paginate($page,$total_rowcount,$items_per_page=10,$pages_visibles=4){ |
@@ -235,9 +245,9 @@ discard block |
||
235 | 245 | |
236 | 246 | /** |
237 | 247 | * Auto Paginates the DataTable element with a Semantic HtmlPaginationMenu component |
238 | - * @param number $page the active page number |
|
239 | - * @param number $items_per_page The number of items per page |
|
240 | - * @param number $pages_visibles The number of visible pages in the Pagination component |
|
248 | + * @param integer $page the active page number |
|
249 | + * @param integer $items_per_page The number of items per page |
|
250 | + * @param integer $pages_visibles The number of visible pages in the Pagination component |
|
241 | 251 | * @return DataTable |
242 | 252 | */ |
243 | 253 | public function autoPaginate($page=1,$items_per_page=10,$pages_visibles=4){ |
@@ -303,6 +313,9 @@ discard block |
||
303 | 313 | return $this; |
304 | 314 | } |
305 | 315 | |
316 | + /** |
|
317 | + * @return string |
|
318 | + */ |
|
306 | 319 | public function getRefreshSelector() { |
307 | 320 | if(isset($this->_refreshSelector)) |
308 | 321 | return $this->_refreshSelector; |