3 final class PhameDescriptionView
extends AphrontTagView
{
10 public function setTitle($title) {
11 $this->title
= $title;
15 public function setDescription($description) {
16 $this->description
= $description;
20 public function setImage($image) {
21 $this->image
= $image;
25 public function setImageHref($href) {
26 $this->imageHref
= $href;
30 protected function getTagAttributes() {
32 $classes[] = 'phame-blog-description';
33 return array('class' => implode(' ', $classes));
36 protected function getTagContent() {
37 require_celerity_resource('phame-css');
39 $description = phutil_tag_div(
40 'phame-blog-description-content', $this->description
);
43 ($this->imageHref
) ?
'a' : 'div',
45 'class' => 'phame-blog-description-image',
46 'style' => 'background-image: url('.$this->image
.');',
47 'href' => $this->imageHref
,
53 'class' => 'phame-blog-description-name',
57 return array($image, $header, $description);