@@ 8-21 (lines=14) @@ | ||
5 | use Ajax\semantic\html\base\HtmlSemDoubleElement; |
|
6 | use Ajax\semantic\html\elements\HtmlIcon; |
|
7 | ||
8 | class HtmlListItem extends HtmlSemDoubleElement { |
|
9 | protected $image; |
|
10 | public function __construct($identifier,$content) { |
|
11 | parent::__construct($identifier, "div", "item"); |
|
12 | $this->_template='<%tagName% id="%identifier%" %properties%>%image%%content%</%tagName%>'; |
|
13 | $this->content=$content; |
|
14 | } |
|
15 | public function addIcon($icon){ |
|
16 | $content=$this->content; |
|
17 | $this->content=new HtmlSemDoubleElement("content-".$this->identifier,"div","content"); |
|
18 | $this->content->setContent($content); |
|
19 | $this->content->addContent(new HtmlIcon("icon".$this->identifier, $icon),true); |
|
20 | } |
|
21 | } |
@@ 8-21 (lines=14) @@ | ||
5 | use Ajax\semantic\html\base\HtmlSemDoubleElement; |
|
6 | use Ajax\semantic\html\elements\HtmlIcon; |
|
7 | ||
8 | class HtmlMenuItem extends HtmlSemDoubleElement { |
|
9 | protected $image; |
|
10 | public function __construct($identifier,$content) { |
|
11 | parent::__construct($identifier, "div", "item"); |
|
12 | $this->_template='<%tagName% id="%identifier%" %properties%>%image%%content%</%tagName%>'; |
|
13 | $this->content=$content; |
|
14 | } |
|
15 | public function addIcon($icon){ |
|
16 | $content=$this->content; |
|
17 | $this->content=new HtmlSemDoubleElement("content-".$this->identifier,"div","content"); |
|
18 | $this->content->setContent($content); |
|
19 | $this->content->addContent(new HtmlIcon("icon".$this->identifier, $icon),true); |
|
20 | } |
|
21 | } |