Completed
Push — master ( 847185...5c7ff3 )
by Jean-Christophe
03:16
created
Ajax/common/html/HtmlCollection.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -49,6 +49,10 @@  discard block
 block discarded – undo
49 49
 		return $itemO;
50 50
 	}
51 51
 
52
+	/**
53
+	 * @param string $classname
54
+	 * @param integer $index
55
+	 */
52 56
 	protected function setItemIdentifier($item,$classname,$index){
53 57
 		if($item instanceof BaseWidget){
54 58
 			if($item->getIdentifier()===""){
@@ -93,6 +97,9 @@  discard block
 block discarded – undo
93 97
 		return $this;
94 98
 	}
95 99
 
100
+	/**
101
+	 * @param integer $index
102
+	 */
96 103
 	public function removeItem($index){
97 104
 		return array_splice($this->content, $index, 1);
98 105
 	}
@@ -108,6 +115,9 @@  discard block
 block discarded – undo
108 115
 		return $this->addItem($function($object));
109 116
 	}
110 117
 
118
+	/**
119
+	 * @param \Closure $callBack
120
+	 */
111 121
 	public function apply($callBack){
112 122
 		foreach ($this->content as $item){
113 123
 			$callBack($item);
Please login to merge, or discard this patch.
Ajax/semantic/widgets/base/FieldAsTrait.php 1 patch
Doc Comments   +18 added lines patch added patch discarded remove patch
@@ -27,9 +27,17 @@  discard block
 block discarded – undo
27 27
 trait FieldAsTrait{
28 28
 
29 29
 	abstract protected function _getFieldIdentifier($prefix,$name="");
30
+
31
+	/**
32
+	 * @param \Closure $callback
33
+	 */
30 34
 	abstract public function setValueFunction($index,$callback);
31 35
 	abstract protected function _getFieldName($index);
32 36
 	abstract protected function _getFieldCaption($index);
37
+
38
+	/**
39
+	 * @param string $event
40
+	 */
33 41
 	abstract protected function _buttonAsSubmit(HtmlButton &$button,$event,$url,$responseElement=NULL,$parameters=NULL);
34 42
 
35 43
 	/**
@@ -68,12 +76,19 @@  discard block
 block discarded – undo
68 76
 		}
69 77
 	}
70 78
 
79
+	/**
80
+	 * @param HtmlFormInput $field
81
+	 */
71 82
 	protected function _prepareFormFields(&$field,$name,&$attributes){
72 83
 		$field->setName($name);
73 84
 		$this->_addRules($field, $attributes);
74 85
 		return $field;
75 86
 	}
76 87
 
88
+	/**
89
+	 * @param \Closure $elementCallback
90
+	 * @param string $prefix
91
+	 */
77 92
 	protected function _fieldAs($elementCallback,$index,$attributes=NULL,$prefix=null){
78 93
 		$this->setValueFunction($index,function($value) use ($index,&$attributes,$elementCallback,$prefix){
79 94
 			$caption=$this->_getFieldCaption($index);
@@ -224,6 +239,9 @@  discard block
 block discarded – undo
224 239
 		}
225 240
 	}
226 241
 
242
+	/**
243
+	 * @param integer $index
244
+	 */
227 245
 	public function fieldAs($index,$type,$attributes=NULL){
228 246
 		$method="fieldAs".\ucfirst($type);
229 247
 		if(\method_exists($this, $method)){
Please login to merge, or discard this patch.
Ajax/semantic/widgets/datatable/DataTable.php 1 patch
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -36,6 +36,10 @@  discard block
 block discarded – undo
36 36
 	protected $_checkedMessage;
37 37
 	protected $_checkedClass;
38 38
 
39
+	/**
40
+	 * @param string $identifier
41
+	 * @param string $model
42
+	 */
39 43
 	public function __construct($identifier,$model,$modelInstance=NULL) {
40 44
 		parent::__construct($identifier, $model,$modelInstance);
41 45
 		$this->_init(new InstanceViewer($identifier), "table", new HtmlTable($identifier, 0,0), false);
@@ -78,6 +82,9 @@  discard block
 block discarded – undo
78 82
 				if(allChecked) {\$parentCheckbox.checkbox('set checked');}else if(allUnchecked){\$parentCheckbox.checkbox('set unchecked');}else{\$parentCheckbox.checkbox('set indeterminate');};".$checkedMessageCall);
79 83
 	}
80 84
 
85
+	/**
86
+	 * @param string $op
87
+	 */
81 88
 	protected function _generateBehavior($op,$params,JsUtils $js){
82 89
 		if(isset($this->_urls[$op])){
83 90
 			$params=\array_merge($params,["attr"=>"data-ajax"]);
@@ -145,6 +152,9 @@  discard block
 block discarded – undo
145 152
 		\array_unshift($captions, $ck);
146 153
 	}
147 154
 
155
+	/**
156
+	 * @param string $checked
157
+	 */
148 158
 	private function _setAllChecked($checked){
149 159
 		$result="$('#".$this->identifier." [name=%quote%selection[]%quote%]').prop('checked',".$checked.");";
150 160
 		if(isset($this->_checkedClass)){
@@ -224,6 +234,9 @@  discard block
 block discarded – undo
224 234
 		return $this;
225 235
 	}
226 236
 
237
+	/**
238
+	 * @param PositionInTable $part
239
+	 */
227 240
 	private function addToolbarRow($part,$table,$captions){
228 241
 		$hasPart=$table->hasPart($part);
229 242
 		if($hasPart){
Please login to merge, or discard this patch.
Ajax/semantic/widgets/datatable/DataTableFieldAsTrait.php 1 patch
Doc Comments   +30 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,15 +13,28 @@  discard block
 block discarded – undo
13 13
  * @property InstanceViewer $_instanceViewer
14 14
  */
15 15
 trait DataTableFieldAsTrait{
16
+
17
+	/**
18
+	 * @param \Closure $field
19
+	 */
16 20
 	abstract public function addField($field);
21
+
22
+	/**
23
+	 * @param integer $index
24
+	 * @param \Closure $field
25
+	 */
17 26
 	abstract public function insertField($index,$field);
27
+
28
+	/**
29
+	 * @param \Closure $field
30
+	 */
18 31
 	abstract public function insertInField($index,$field);
19 32
 	abstract public function fieldAs($index,$type,$attributes=NULL);
20 33
 	/**
21 34
 	 * @param string $caption
22 35
 	 * @param callable $callback
23 36
 	 * @param boolean $visibleHover
24
-	 * @return callable
37
+	 * @return \Closure
25 38
 	 */
26 39
 	private function getFieldButtonCallable($caption,$visibleHover=true,$callback=null){
27 40
 		return $this->getCallable("getFieldButton",[$caption,$visibleHover],$callback);
@@ -31,7 +44,7 @@  discard block
 block discarded – undo
31 44
 	 * @param callable $thisCallback
32 45
 	 * @param array $parameters
33 46
 	 * @param callable $callback
34
-	 * @return callable
47
+	 * @return \Closure
35 48
 	 */
36 49
 	private function getCallable($thisCallback,$parameters,$callback=null){
37 50
 		$result=function($instance) use($thisCallback,$parameters,$callback){
@@ -83,6 +96,9 @@  discard block
 block discarded – undo
83 96
 		}, $index,$attributes);
84 97
 	}
85 98
 
99
+	/**
100
+	 * @param HtmlButton $element
101
+	 */
86 102
 	protected function _visibleOver($element){
87 103
 		$this->_visibleHover=true;
88 104
 		return $element->addToProperty("class", "visibleover")->setProperty("style","visibility:hidden;");
@@ -93,7 +109,7 @@  discard block
 block discarded – undo
93 109
 	 * @param string $caption
94 110
 	 * @param callable $callback
95 111
 	 * @param boolean $visibleHover
96
-	 * @return \Ajax\semantic\widgets\datatable\DataTable
112
+	 * @return DataTableFieldAsTrait
97 113
 	 */
98 114
 	public function addFieldButton($caption,$visibleHover=true,$callback=null){
99 115
 		$this->addField($this->getCallable("getFieldButton",[$caption,$visibleHover],$callback));
@@ -105,7 +121,7 @@  discard block
 block discarded – undo
105 121
 	 * @param int $index
106 122
 	 * @param string $caption
107 123
 	 * @param callable $callback
108
-	 * @return \Ajax\semantic\widgets\datatable\DataTable
124
+	 * @return DataTableFieldAsTrait
109 125
 	 */
110 126
 	public function insertFieldButton($index,$caption,$visibleHover=true,$callback=null){
111 127
 		$this->insertField($index, $this->getFieldButtonCallable($caption,$visibleHover,$callback));
@@ -117,18 +133,26 @@  discard block
 block discarded – undo
117 133
 	 * @param int $index
118 134
 	 * @param string $caption
119 135
 	 * @param callable $callback
120
-	 * @return \Ajax\semantic\widgets\datatable\DataTable
136
+	 * @return DataTableFieldAsTrait
121 137
 	 */
122 138
 	public function insertInFieldButton($index,$caption,$visibleHover=true,$callback=null){
123 139
 		$this->insertInField($index, $this->getFieldButtonCallable($caption,$visibleHover,$callback));
124 140
 		return $this;
125 141
 	}
126 142
 
143
+	/**
144
+	 * @param string $icon
145
+	 * @param string $class
146
+	 */
127 147
 	private function addDefaultButton($icon,$class=null,$visibleHover=true,$callback=null){
128 148
 		$this->addField($this->getCallable("getDefaultButton",[$icon,$class,$visibleHover],$callback));
129 149
 		return $this;
130 150
 	}
131 151
 
152
+	/**
153
+	 * @param string $icon
154
+	 * @param string $class
155
+	 */
132 156
 	private function insertDefaultButtonIn($index,$icon,$class=null,$visibleHover=true,$callback=null){
133 157
 		$this->insertInField($index,$this->getCallable("getDefaultButton",[$icon,$class,$visibleHover],$callback));
134 158
 		return $this;
@@ -146,7 +170,7 @@  discard block
 block discarded – undo
146 170
 	 * @param boolean $visibleHover
147 171
 	 * @param array $deleteBehavior
148 172
 	 * @param callable $callback
149
-	 * @return DataTable
173
+	 * @return DataTableFieldAsTrait
150 174
 	 */
151 175
 	public function addDeleteButton($visibleHover=true,$deleteBehavior=[],$callback=null){
152 176
 		$this->_deleteBehavior=$deleteBehavior;
Please login to merge, or discard this patch.