@@ -19,6 +19,9 @@ discard block |
||
19 | 19 | protected $style=""; |
20 | 20 | protected $styleLimits=null; |
21 | 21 | |
22 | + /** |
|
23 | + * @param string $identifier |
|
24 | + */ |
|
22 | 25 | public function __construct($identifier, $style="info", $value=0, $max=100, $min=0) { |
23 | 26 | parent::__construct($identifier); |
24 | 27 | $this->_template=include 'templates/tplProgressbar.php'; |
@@ -28,6 +31,9 @@ discard block |
||
28 | 31 | $this->setStyle($style); |
29 | 32 | } |
30 | 33 | |
34 | + /** |
|
35 | + * @param boolean $value |
|
36 | + */ |
|
31 | 37 | public function setActive($value) { |
32 | 38 | if(\is_array($this->content)){ |
33 | 39 | foreach ($this->content as $pb){ |
@@ -42,6 +48,9 @@ discard block |
||
42 | 48 | return $this; |
43 | 49 | } |
44 | 50 | |
51 | + /** |
|
52 | + * @param boolean $value |
|
53 | + */ |
|
45 | 54 | public function setStriped($value) { |
46 | 55 | if(\is_array($this->content)){ |
47 | 56 | foreach ($this->content as $pb){ |
@@ -56,6 +65,9 @@ discard block |
||
56 | 65 | return $this; |
57 | 66 | } |
58 | 67 | |
68 | + /** |
|
69 | + * @param boolean $value |
|
70 | + */ |
|
59 | 71 | public function showCaption($value) { |
60 | 72 | if(\is_array($this->content)){ |
61 | 73 | foreach ($this->content as $pb){ |
@@ -113,6 +125,9 @@ discard block |
||
113 | 125 | return $this->stacked; |
114 | 126 | } |
115 | 127 | |
128 | + /** |
|
129 | + * @param boolean $stacked |
|
130 | + */ |
|
116 | 131 | public function setStacked($stacked) { |
117 | 132 | $this->stacked=$stacked; |
118 | 133 | return $this; |
@@ -121,7 +136,7 @@ discard block |
||
121 | 136 | /** |
122 | 137 | * define the progressbar style |
123 | 138 | * avaible values : "success","info","warning","danger" |
124 | - * @param string|int $cssStyle |
|
139 | + * @param string $cssStyle |
|
125 | 140 | * @return \Ajax\bootstrap\html\HtmlProgressbar default : "" |
126 | 141 | */ |
127 | 142 | public function setStyle($cssStyle) { |
@@ -63,6 +63,10 @@ discard block |
||
63 | 63 | |
64 | 64 | |
65 | 65 | |
66 | + /** |
|
67 | + * @param string $name |
|
68 | + * @param string[] $typeCtrl |
|
69 | + */ |
|
66 | 70 | protected function setMemberCtrl(&$name, $value, $typeCtrl) { |
67 | 71 | if ($this->ctrl($name, $value, $typeCtrl) === true) { |
68 | 72 | return $name=$value; |
@@ -80,6 +84,10 @@ discard block |
||
80 | 84 | |
81 | 85 | |
82 | 86 | |
87 | + /** |
|
88 | + * @param string $name |
|
89 | + * @param string[] $typeCtrl |
|
90 | + */ |
|
83 | 91 | protected function addToMemberCtrl(&$name, $value, $typeCtrl, $separator=" ") { |
84 | 92 | if ($this->ctrl($name, $value, $typeCtrl) === true) { |
85 | 93 | if (\is_array($typeCtrl)) { |
@@ -90,6 +98,9 @@ discard block |
||
90 | 98 | return $this; |
91 | 99 | } |
92 | 100 | |
101 | + /** |
|
102 | + * @param string $name |
|
103 | + */ |
|
93 | 104 | protected function addToMember(&$name, $value, $separator=" ") { |
94 | 105 | $name=str_ireplace($value, "", $name) . $separator . $value; |
95 | 106 | return $this; |
@@ -102,6 +113,9 @@ discard block |
||
102 | 113 | $oldValue=trim($oldValue); |
103 | 114 | } |
104 | 115 | |
116 | + /** |
|
117 | + * @param \Closure $callback |
|
118 | + */ |
|
105 | 119 | protected function _getElementBy($callback,$elements){ |
106 | 120 | if (\is_array($elements)) { |
107 | 121 | $elements=\array_values($elements); |
@@ -183,6 +197,9 @@ discard block |
||
183 | 197 | return $this->_bsComponent; |
184 | 198 | } |
185 | 199 | |
200 | + /** |
|
201 | + * @param \Ajax\semantic\components\Form $bsComponent |
|
202 | + */ |
|
186 | 203 | public function setBsComponent($bsComponent) { |
187 | 204 | $this->_bsComponent=$bsComponent; |
188 | 205 | return $this; |
@@ -14,15 +14,28 @@ discard block |
||
14 | 14 | * @property InstanceViewer $_instanceViewer |
15 | 15 | */ |
16 | 16 | trait DataTableFieldAsTrait{ |
17 | + |
|
18 | + /** |
|
19 | + * @param \Closure $field |
|
20 | + */ |
|
17 | 21 | abstract public function addField($field); |
22 | + |
|
23 | + /** |
|
24 | + * @param integer $index |
|
25 | + * @param \Closure $field |
|
26 | + */ |
|
18 | 27 | abstract public function insertField($index,$field); |
28 | + |
|
29 | + /** |
|
30 | + * @param \Closure $field |
|
31 | + */ |
|
19 | 32 | abstract public function insertInField($index,$field); |
20 | 33 | abstract public function fieldAs($index,$type,$attributes=NULL); |
21 | 34 | /** |
22 | 35 | * @param string $caption |
23 | 36 | * @param callable $callback |
24 | 37 | * @param boolean $visibleHover |
25 | - * @return callable |
|
38 | + * @return \Closure |
|
26 | 39 | */ |
27 | 40 | private function getFieldButtonCallable($caption,$visibleHover=true,$callback=null){ |
28 | 41 | return $this->getCallable("getFieldButton",[$caption,$visibleHover],$callback); |
@@ -32,7 +45,7 @@ discard block |
||
32 | 45 | * @param callable $thisCallback |
33 | 46 | * @param array $parameters |
34 | 47 | * @param callable $callback |
35 | - * @return callable |
|
48 | + * @return \Closure |
|
36 | 49 | */ |
37 | 50 | private function getCallable($thisCallback,$parameters,$callback=null){ |
38 | 51 | $result=function($instance) use($thisCallback,$parameters,$callback){ |
@@ -94,7 +107,7 @@ discard block |
||
94 | 107 | * @param string $caption |
95 | 108 | * @param callable $callback |
96 | 109 | * @param boolean $visibleHover |
97 | - * @return \Ajax\semantic\widgets\datatable\DataTable |
|
110 | + * @return DataTableFieldAsTrait |
|
98 | 111 | */ |
99 | 112 | public function addFieldButton($caption,$visibleHover=true,$callback=null){ |
100 | 113 | $this->addField($this->getCallable("getFieldButton",[$caption,$visibleHover],$callback)); |
@@ -106,7 +119,7 @@ discard block |
||
106 | 119 | * @param int $index |
107 | 120 | * @param string $caption |
108 | 121 | * @param callable $callback |
109 | - * @return \Ajax\semantic\widgets\datatable\DataTable |
|
122 | + * @return DataTableFieldAsTrait |
|
110 | 123 | */ |
111 | 124 | public function insertFieldButton($index,$caption,$visibleHover=true,$callback=null){ |
112 | 125 | $this->insertField($index, $this->getFieldButtonCallable($caption,$visibleHover,$callback)); |
@@ -118,18 +131,26 @@ discard block |
||
118 | 131 | * @param int $index |
119 | 132 | * @param string $caption |
120 | 133 | * @param callable $callback |
121 | - * @return \Ajax\semantic\widgets\datatable\DataTable |
|
134 | + * @return DataTableFieldAsTrait |
|
122 | 135 | */ |
123 | 136 | public function insertInFieldButton($index,$caption,$visibleHover=true,$callback=null){ |
124 | 137 | $this->insertInField($index, $this->getFieldButtonCallable($caption,$visibleHover,$callback)); |
125 | 138 | return $this; |
126 | 139 | } |
127 | 140 | |
141 | + /** |
|
142 | + * @param string $icon |
|
143 | + * @param string $class |
|
144 | + */ |
|
128 | 145 | private function addDefaultButton($icon,$class=null,$visibleHover=true,$callback=null){ |
129 | 146 | $this->addField($this->getCallable("getDefaultButton",[$icon,$class,$visibleHover],$callback)); |
130 | 147 | return $this; |
131 | 148 | } |
132 | 149 | |
150 | + /** |
|
151 | + * @param string $icon |
|
152 | + * @param string $class |
|
153 | + */ |
|
133 | 154 | private function insertDefaultButtonIn($index,$icon,$class=null,$visibleHover=true,$callback=null){ |
134 | 155 | $this->insertInField($index,$this->getCallable("getDefaultButton",[$icon,$class,$visibleHover],$callback)); |
135 | 156 | return $this; |
@@ -147,7 +168,7 @@ discard block |
||
147 | 168 | * @param boolean $visibleHover |
148 | 169 | * @param array $deleteBehavior |
149 | 170 | * @param callable $callback |
150 | - * @return DataTable |
|
171 | + * @return DataTableFieldAsTrait |
|
151 | 172 | */ |
152 | 173 | public function addDeleteButton($visibleHover=true,$deleteBehavior=[],$callback=null){ |
153 | 174 | $this->_deleteBehavior=$deleteBehavior; |
@@ -7,6 +7,11 @@ |
||
7 | 7 | use Ajax\common\html\HtmlDoubleElement; |
8 | 8 | |
9 | 9 | trait AttachedTrait { |
10 | + |
|
11 | + /** |
|
12 | + * @param string $name |
|
13 | + * @param string $value |
|
14 | + */ |
|
10 | 15 | abstract public function addToPropertyCtrl($name, $value, $typeCtrl); |
11 | 16 | /** |
12 | 17 | * @param HtmlSemDoubleElement $toElement |
@@ -25,6 +25,9 @@ discard block |
||
25 | 25 | protected $_associative; |
26 | 26 | protected $_multiple; |
27 | 27 | |
28 | + /** |
|
29 | + * @param string $identifier |
|
30 | + */ |
|
28 | 31 | public function __construct($identifier, $value="", $items=array(),$associative=true) { |
29 | 32 | parent::__construct($identifier, "div"); |
30 | 33 | $this->_template=include dirname(__FILE__).'/../templates/tplDropdown.php'; |
@@ -78,7 +81,7 @@ discard block |
||
78 | 81 | /** |
79 | 82 | * Insert an item at a position |
80 | 83 | * @param mixed $item |
81 | - * @param number $position |
|
84 | + * @param integer $position |
|
82 | 85 | * @return \Ajax\semantic\html\content\HtmlDropdownItem|unknown |
83 | 86 | */ |
84 | 87 | public function insertItem($item,$position=0){ |
@@ -186,6 +189,9 @@ discard block |
||
186 | 189 | } |
187 | 190 | } |
188 | 191 | |
192 | + /** |
|
193 | + * @param integer $index |
|
194 | + */ |
|
189 | 195 | public function getItem($index){ |
190 | 196 | return $this->items[$index]; |
191 | 197 | } |
@@ -279,6 +285,9 @@ discard block |
||
279 | 285 | return $this->addToPropertyCtrl("class", $value." pointing",Direction::getConstantValues("pointing")); |
280 | 286 | } |
281 | 287 | |
288 | + /** |
|
289 | + * @param string $value |
|
290 | + */ |
|
282 | 291 | public function setValue($value){ |
283 | 292 | $this->value=$value; |
284 | 293 | return $this; |
@@ -315,6 +324,9 @@ discard block |
||
315 | 324 | return $this->addToPropertyCtrl("class", "compact", array("compact")); |
316 | 325 | } |
317 | 326 | |
327 | + /** |
|
328 | + * @param string $action |
|
329 | + */ |
|
318 | 330 | public function setAction($action){ |
319 | 331 | $this->_params["action"]=$action; |
320 | 332 | } |