@@ 23-28 (lines=6) @@ | ||
20 | $this->asMiniAvatar($image); |
|
21 | } |
|
22 | ||
23 | public function setDescription($description){ |
|
24 | $descO=new HtmlDoubleElement("desc-".$this->identifier,"span"); |
|
25 | $descO->setClass("description"); |
|
26 | $descO->setContent($description); |
|
27 | return $this->addContent($descO,true); |
|
28 | } |
|
29 | ||
30 | public function setData($value){ |
|
31 | $this->setProperty("data-value", $value); |
|
@@ 44-50 (lines=7) @@ | ||
41 | * @param string $image the image src |
|
42 | * @return \Ajax\common\html\html5\HtmlImg |
|
43 | */ |
|
44 | public function asMiniAvatar($image){ |
|
45 | $this->tagName="div"; |
|
46 | $img=new HtmlImg("image-".$this->identifier,$image); |
|
47 | $img->setClass("ui mini avatar image"); |
|
48 | $this->addContent($img,true); |
|
49 | return $img; |
|
50 | } |
|
51 | ||
52 | public function asSearchInput($placeholder=NULL,$icon=NULL){ |
|
53 | $this->setClass("ui icon search input"); |
@@ 60-66 (lines=7) @@ | ||
57 | * @param string $detail |
|
58 | * @return \Ajax\common\html\HtmlDoubleElement |
|
59 | */ |
|
60 | public function addDetail($detail){ |
|
61 | $div=new HtmlDoubleElement("detail-".$this->identifier,$this->tagName); |
|
62 | $div->setClass("detail"); |
|
63 | $div->setContent($detail); |
|
64 | $this->addContent($div); |
|
65 | return $div; |
|
66 | } |
|
67 | } |