@@ 51-61 (lines=11) @@ | ||
48 | $this->input=new HtmlInput($name,"hidden"); |
|
49 | } |
|
50 | ||
51 | public function addItems($items){ |
|
52 | if(JArray::isAssociative($items)){ |
|
53 | foreach ($items as $k=>$v){ |
|
54 | $this->addItem($v)->setData($k); |
|
55 | } |
|
56 | }else{ |
|
57 | foreach ($items as $item){ |
|
58 | $this->addItem($item); |
|
59 | } |
|
60 | } |
|
61 | } |
|
62 | ||
63 | /** |
|
64 | * @param boolean $dropdown |
@@ 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; |