Completed
Push — master ( 613cdf...3ded41 )
by Jean-Christophe
03:06
created
Ajax/semantic/widgets/datatable/DataTable.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -36,6 +36,10 @@  discard block
 block discarded – undo
36 36
 	protected $_targetSelector;
37 37
 	protected $_checkedMessage;
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);
@@ -75,6 +79,9 @@  discard block
 block discarded – undo
75 79
 				if(allChecked) {\$parentCheckbox.checkbox('set checked');}else if(allUnchecked){\$parentCheckbox.checkbox('set unchecked');}else{\$parentCheckbox.checkbox('set indeterminate');};".$checkedMessageCall);
76 80
 	}
77 81
 
82
+	/**
83
+	 * @param string $op
84
+	 */
78 85
 	protected function _generateBehavior($op,JsUtils $js){
79 86
 		if(isset($this->_urls[$op]))
80 87
 			$js->getOnClick("#".$this->identifier." .".$op, $this->_urls[$op],$this->getTargetSelector(),["preventDefault"=>false,"attr"=>"data-ajax"]);
@@ -210,6 +217,9 @@  discard block
 block discarded – undo
210 217
 		return $this;
211 218
 	}
212 219
 
220
+	/**
221
+	 * @param PositionInTable $part
222
+	 */
213 223
 	private function addToolbarRow($part,$table,$captions){
214 224
 		$hasPart=$table->hasPart($part);
215 225
 		if($hasPart){
Please login to merge, or discard this patch.
Ajax/semantic/widgets/datatable/DataTableFieldAsTrait.php 1 patch
Doc Comments   +29 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,15 +12,28 @@  discard block
 block discarded – undo
12 12
  * @property InstanceViewer $_instanceViewer
13 13
  */
14 14
 trait DataTableFieldAsTrait{
15
+
16
+	/**
17
+	 * @param \Closure $field
18
+	 */
15 19
 	abstract public function addField($field);
20
+
21
+	/**
22
+	 * @param integer $index
23
+	 * @param \Closure $field
24
+	 */
16 25
 	abstract public function insertField($index,$field);
26
+
27
+	/**
28
+	 * @param \Closure $field
29
+	 */
17 30
 	abstract public function insertInField($index,$field);
18 31
 	abstract public function fieldAs($index,$type,$attributes=NULL);
19 32
 	/**
20 33
 	 * @param string $caption
21 34
 	 * @param callable $callback
22 35
 	 * @param boolean $visibleHover
23
-	 * @return callable
36
+	 * @return \Closure
24 37
 	 */
25 38
 	private function getFieldButtonCallable($caption,$visibleHover=true,$callback=null){
26 39
 		return $this->getCallable("getFieldButton",[$caption,$visibleHover],$callback);
@@ -30,7 +43,7 @@  discard block
 block discarded – undo
30 43
 	 * @param callable $thisCallback
31 44
 	 * @param array $parameters
32 45
 	 * @param callable $callback
33
-	 * @return callable
46
+	 * @return \Closure
34 47
 	 */
35 48
 	private function getCallable($thisCallback,$parameters,$callback=null){
36 49
 		$result=function($instance) use($thisCallback,$parameters,$callback){
@@ -82,6 +95,9 @@  discard block
 block discarded – undo
82 95
 		}, $index,$attributes);
83 96
 	}
84 97
 
98
+	/**
99
+	 * @param HtmlButton $element
100
+	 */
85 101
 	protected function _visibleOver($element){
86 102
 		$this->_visibleHover=true;
87 103
 		return $element->addToProperty("class", "visibleover")->setProperty("style","visibility:hidden;");
@@ -92,7 +108,7 @@  discard block
 block discarded – undo
92 108
 	 * @param string $caption
93 109
 	 * @param callable $callback
94 110
 	 * @param boolean $visibleHover
95
-	 * @return \Ajax\semantic\widgets\datatable\DataTable
111
+	 * @return DataTableFieldAsTrait
96 112
 	 */
97 113
 	public function addFieldButton($caption,$visibleHover=true,$callback=null){
98 114
 		$this->addField($this->getCallable("getFieldButton",[$caption,$visibleHover],$callback));
@@ -104,7 +120,7 @@  discard block
 block discarded – undo
104 120
 	 * @param int $index
105 121
 	 * @param string $caption
106 122
 	 * @param callable $callback
107
-	 * @return \Ajax\semantic\widgets\datatable\DataTable
123
+	 * @return DataTableFieldAsTrait
108 124
 	 */
109 125
 	public function insertFieldButton($index,$caption,$visibleHover=true,$callback=null){
110 126
 		$this->insertField($index, $this->getFieldButtonCallable($caption,$visibleHover,$callback));
@@ -116,18 +132,26 @@  discard block
 block discarded – undo
116 132
 	 * @param int $index
117 133
 	 * @param string $caption
118 134
 	 * @param callable $callback
119
-	 * @return \Ajax\semantic\widgets\datatable\DataTable
135
+	 * @return DataTableFieldAsTrait
120 136
 	 */
121 137
 	public function insertInFieldButton($index,$caption,$visibleHover=true,$callback=null){
122 138
 		$this->insertInField($index, $this->getFieldButtonCallable($caption,$visibleHover,$callback));
123 139
 		return $this;
124 140
 	}
125 141
 
142
+	/**
143
+	 * @param string $icon
144
+	 * @param string $class
145
+	 */
126 146
 	private function addDefaultButton($icon,$class=null,$visibleHover=true,$callback=null){
127 147
 		$this->addField($this->getCallable("getDefaultButton",[$icon,$class,$visibleHover],$callback));
128 148
 		return $this;
129 149
 	}
130 150
 
151
+	/**
152
+	 * @param string $icon
153
+	 * @param string $class
154
+	 */
131 155
 	private function insertDefaultButtonIn($index,$icon,$class=null,$visibleHover=true,$callback=null){
132 156
 		$this->insertInField($index,$this->getCallable("getDefaultButton",[$icon,$class,$visibleHover],$callback));
133 157
 		return $this;
Please login to merge, or discard this patch.
Ajax/common/html/BaseHtml.php 1 patch
Doc Comments   +14 added lines patch added patch discarded remove patch
@@ -71,6 +71,10 @@  discard block
 block discarded – undo
71 71
 
72 72
 
73 73
 
74
+	/**
75
+	 * @param string $name
76
+	 * @param string[] $typeCtrl
77
+	 */
74 78
 	protected function setMemberCtrl(&$name, $value, $typeCtrl) {
75 79
 		if ($this->ctrl($name, $value, $typeCtrl) === true) {
76 80
 			return $name=$value;
@@ -88,6 +92,10 @@  discard block
 block discarded – undo
88 92
 
89 93
 
90 94
 
95
+	/**
96
+	 * @param string $name
97
+	 * @param string[] $typeCtrl
98
+	 */
91 99
 	protected function addToMemberCtrl(&$name, $value, $typeCtrl, $separator=" ") {
92 100
 		if ($this->ctrl($name, $value, $typeCtrl) === true) {
93 101
 			if (\is_array($typeCtrl)) {
@@ -98,6 +106,9 @@  discard block
 block discarded – undo
98 106
 		return $this;
99 107
 	}
100 108
 
109
+	/**
110
+	 * @param string $name
111
+	 */
101 112
 	protected function addToMember(&$name, $value, $separator=" ") {
102 113
 		$name=str_ireplace($value, "", $name) . $separator . $value;
103 114
 		return $this;
@@ -179,6 +190,9 @@  discard block
 block discarded – undo
179 190
 		return $this->_getElementBy(function($element) use ($identifier){return $element->getIdentifier()===$identifier;}, $elements);
180 191
 	}
181 192
 
193
+	/**
194
+	 * @param \Closure $callback
195
+	 */
182 196
 	protected function _getElementBy($callback,$elements){
183 197
 		if (\is_array($elements)) {
184 198
 			$flag=false;
Please login to merge, or discard this patch.