Completed
Push — master ( b65ced...b3219e )
by Jean-Christophe
03:16
created
Ajax/common/html/traits/BaseHtmlPropertiesTrait.php 1 patch
Doc Comments   +17 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 	/**
21 21
 	 * @param array|string $properties
22
-	 * @return BaseHtml
22
+	 * @return BaseHtmlPropertiesTrait
23 23
 	 */
24 24
 	public function setProperties($properties) {
25 25
 		$this->properties=$properties;
@@ -58,11 +58,17 @@  discard block
 block discarded – undo
58 58
 		return $this;
59 59
 	}
60 60
 
61
+	/**
62
+	 * @param string $name
63
+	 */
61 64
 	protected function removePropertyValue($name, $value) {
62 65
 		$this->properties[$name]=\str_replace($value, "", $this->properties[$name]);
63 66
 		return $this;
64 67
 	}
65 68
 
69
+	/**
70
+	 * @param string $name
71
+	 */
66 72
 	protected function removePropertyValues($name, $values) {
67 73
 		$this->removeOldValues($this->properties[$name], $values);
68 74
 		return $this;
@@ -77,6 +83,9 @@  discard block
 block discarded – undo
77 83
 			return $this->addToProperty($name, $value);
78 84
 	}
79 85
 
86
+	/**
87
+	 * @param string $name
88
+	 */
80 89
 	public function addToPropertyCtrl($name, $value, $typeCtrl) {
81 90
 		return $this->addToPropertyUnique($name, $value, $typeCtrl);
82 91
 	}
@@ -88,6 +97,9 @@  discard block
 block discarded – undo
88 97
 		return $this;
89 98
 	}
90 99
 
100
+	/**
101
+	 * @param string $name
102
+	 */
91 103
 	public function removeProperty($name) {
92 104
 		if (\array_key_exists($name, $this->properties))
93 105
 			unset($this->properties[$name]);
@@ -108,6 +120,10 @@  discard block
 block discarded – undo
108 120
 			return $this;
109 121
 	}
110 122
 
123
+	/**
124
+	 * @param string $propertyName
125
+	 * @param string $value
126
+	 */
111 127
 	protected function getElementByPropertyValue($propertyName,$value, $elements) {
112 128
 		if (\is_array($elements)) {
113 129
 			$flag=false;
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.