@@ -9,15 +9,15 @@ discard block |
||
9 | 9 | protected $image; |
10 | 10 | |
11 | 11 | public function __construct($identifier, $content=NULL) { |
12 | - parent::__construct($identifier,"item",$content); |
|
12 | + parent::__construct($identifier, "item", $content); |
|
13 | 13 | } |
14 | - protected function initContent($content){ |
|
15 | - if(\is_array($content)){ |
|
16 | - if(JArray::isAssociative($content)===false){ |
|
14 | + protected function initContent($content) { |
|
15 | + if (\is_array($content)) { |
|
16 | + if (JArray::isAssociative($content)===false) { |
|
17 | 17 | $icon=@$content[0]; |
18 | 18 | $title=@$content[1]; |
19 | 19 | $desc=@$content[2]; |
20 | - }else{ |
|
20 | + } else { |
|
21 | 21 | $icon=@$content["icon"]; |
22 | 22 | $image=@$content["image"]; |
23 | 23 | $title=@$content["title"]; |
@@ -25,21 +25,21 @@ discard block |
||
25 | 25 | $desc=@$content["description"]; |
26 | 26 | $items=@$content["items"]; |
27 | 27 | } |
28 | - if(isset($icon)===true){ |
|
28 | + if (isset($icon)===true) { |
|
29 | 29 | $this->setIcon($icon); |
30 | 30 | } |
31 | - if(isset($image)){ |
|
31 | + if (isset($image)) { |
|
32 | 32 | $this->setImage($image); |
33 | 33 | } |
34 | - if(isset($title)===true){ |
|
35 | - $this->setTitle($title,$desc); |
|
36 | - }elseif (isset($header)===true){ |
|
37 | - $this->setTitle($header,$desc,"header"); |
|
34 | + if (isset($title)===true) { |
|
35 | + $this->setTitle($title, $desc); |
|
36 | + }elseif (isset($header)===true) { |
|
37 | + $this->setTitle($header, $desc, "header"); |
|
38 | 38 | } |
39 | - if(isset($items)===true){ |
|
39 | + if (isset($items)===true) { |
|
40 | 40 | $this->addList($items); |
41 | 41 | } |
42 | - }else{ |
|
42 | + } else { |
|
43 | 43 | $this->setContent($content); |
44 | 44 | } |
45 | 45 | } |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | return $list; |
51 | 51 | } |
52 | 52 | |
53 | - public function getList(){ |
|
53 | + public function getList() { |
|
54 | 54 | return $this->content["list"]; |
55 | 55 | } |
56 | 56 | |
57 | - public function getItem($index){ |
|
57 | + public function getItem($index) { |
|
58 | 58 | return $this->getList()->getItem($index); |
59 | 59 | } |
60 | 60 | } |
61 | 61 | \ No newline at end of file |