@@ -20,6 +20,9 @@ |
||
| 20 | 20 | $this->params["fields"]=[]; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | + /** |
|
| 24 | + * @param string $identifier |
|
| 25 | + */ |
|
| 23 | 26 | public function addField($identifier){ |
| 24 | 27 | $this->params["fields"][$identifier]=new FieldValidation($identifier); |
| 25 | 28 | } |
@@ -55,6 +55,10 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | |
| 58 | + /** |
|
| 59 | + * @param string $name |
|
| 60 | + * @param string[] $typeCtrl |
|
| 61 | + */ |
|
| 58 | 62 | protected function setMemberCtrl(&$name, $value, $typeCtrl) { |
| 59 | 63 | if ($this->ctrl($name, $value, $typeCtrl) === true) { |
| 60 | 64 | return $name=$value; |
@@ -72,6 +76,10 @@ discard block |
||
| 72 | 76 | |
| 73 | 77 | |
| 74 | 78 | |
| 79 | + /** |
|
| 80 | + * @param string $name |
|
| 81 | + * @param string[] $typeCtrl |
|
| 82 | + */ |
|
| 75 | 83 | protected function addToMemberCtrl(&$name, $value, $typeCtrl, $separator=" ") { |
| 76 | 84 | if ($this->ctrl($name, $value, $typeCtrl) === true) { |
| 77 | 85 | if (\is_array($typeCtrl)) { |
@@ -82,6 +90,9 @@ discard block |
||
| 82 | 90 | return $this; |
| 83 | 91 | } |
| 84 | 92 | |
| 93 | + /** |
|
| 94 | + * @param string $name |
|
| 95 | + */ |
|
| 85 | 96 | protected function addToMember(&$name, $value, $separator=" ") { |
| 86 | 97 | $name=str_ireplace($value, "", $name) . $separator . $value; |
| 87 | 98 | return $this; |
@@ -94,6 +105,9 @@ discard block |
||
| 94 | 105 | $oldValue=trim($oldValue); |
| 95 | 106 | } |
| 96 | 107 | |
| 108 | + /** |
|
| 109 | + * @param \Closure $callback |
|
| 110 | + */ |
|
| 97 | 111 | protected function _getElementBy($callback,$elements){ |
| 98 | 112 | if (\is_array($elements)) { |
| 99 | 113 | $flag=false; |
@@ -53,6 +53,9 @@ discard block |
||
| 53 | 53 | $element->setStyle($value); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | + /** |
|
| 57 | + * @param HtmlDropdown $bt |
|
| 58 | + */ |
|
| 56 | 59 | private function dropdownAsButton($bt) { |
| 57 | 60 | $this->addExistingDropDown($bt); |
| 58 | 61 | $bt->setTagName("button"); |
@@ -81,6 +84,9 @@ discard block |
||
| 81 | 84 | return $result; |
| 82 | 85 | } |
| 83 | 86 | |
| 87 | + /** |
|
| 88 | + * @param integer $iid |
|
| 89 | + */ |
|
| 84 | 90 | private function _addArrayElement(array $element,$iid){ |
| 85 | 91 | if (array_key_exists("glyph", $element)) |
| 86 | 92 | $bt=new HtmlGlyphButton($this->identifier."-button-".$iid); |
@@ -49,6 +49,10 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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); |