@@ -50,6 +50,10 @@ discard block |
||
| 50 | 50 | return $itemO; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | + /** |
|
| 54 | + * @param string $classname |
|
| 55 | + * @param integer $index |
|
| 56 | + */ |
|
| 53 | 57 | protected function setItemIdentifier($item,$classname,$index){ |
| 54 | 58 | if($item instanceof BaseWidget){ |
| 55 | 59 | if(JString::isNull($item->getIdentifier())){ |
@@ -94,6 +98,9 @@ discard block |
||
| 94 | 98 | return $this; |
| 95 | 99 | } |
| 96 | 100 | |
| 101 | + /** |
|
| 102 | + * @param integer $index |
|
| 103 | + */ |
|
| 97 | 104 | public function removeItem($index){ |
| 98 | 105 | return array_splice($this->content, $index, 1); |
| 99 | 106 | } |
@@ -109,6 +116,9 @@ discard block |
||
| 109 | 116 | return $this->addItem($function($object)); |
| 110 | 117 | } |
| 111 | 118 | |
| 119 | + /** |
|
| 120 | + * @param \Closure $callBack |
|
| 121 | + */ |
|
| 112 | 122 | public function apply($callBack){ |
| 113 | 123 | foreach ($this->content as $item){ |
| 114 | 124 | $callBack($item); |