@@ 21-31 (lines=11) @@ | ||
18 | $this->content=array(); |
|
19 | } |
|
20 | ||
21 | public function addItems($items){ |
|
22 | if(JArray::isAssociative($items)){ |
|
23 | foreach ($items as $k=>$v){ |
|
24 | $this->addItem([$k,$v]); |
|
25 | } |
|
26 | }else{ |
|
27 | foreach ($items as $item){ |
|
28 | $this->addItem($item); |
|
29 | } |
|
30 | } |
|
31 | } |
|
32 | ||
33 | public function setItems($items){ |
|
34 | $this->content=$items; |
@@ 58-68 (lines=11) @@ | ||
55 | $this->input=new HtmlInput($name,"hidden"); |
|
56 | } |
|
57 | ||
58 | public function addItems($items){ |
|
59 | if(JArray::isAssociative($items)){ |
|
60 | foreach ($items as $k=>$v){ |
|
61 | $this->addItem($v)->setData($k); |
|
62 | } |
|
63 | }else{ |
|
64 | foreach ($items as $item){ |
|
65 | $this->addItem($item); |
|
66 | } |
|
67 | } |
|
68 | } |
|
69 | ||
70 | /** |
|
71 | * @param boolean $dropdown |