Path: blob/master/src/view/phui/PHUIDocumentSummaryView.php
12249 views
<?php12final class PHUIDocumentSummaryView extends AphrontTagView {34private $title;5private $image;6private $imageHref;7private $subtitle;8private $href;9private $summary;10private $draft;1112public function setTitle($title) {13$this->title = $title;14return $this;15}1617public function setSubtitle($subtitle) {18$this->subtitle = $subtitle;19return $this;20}2122public function setImage($image) {23$this->image = $image;24return $this;25}2627public function setImageHref($image_href) {28$this->imageHref = $image_href;29return $this;30}3132public function setHref($href) {33$this->href = $href;34return $this;35}3637public function setSummary($summary) {38$this->summary = $summary;39return $this;40}4142public function setDraft($draft) {43$this->draft = $draft;44return $this;45}4647protected function getTagAttributes() {48$classes = array();49$classes[] = 'phui-document-summary-view';50$classes[] = 'phabricator-remarkup';5152if ($this->draft) {53$classes[] = 'is-draft';54}5556return array(57'class' => implode(' ', $classes),58);59}6061protected function getTagContent() {62require_celerity_resource('phui-document-summary-view-css');6364$title = phutil_tag(65'a',66array(67'href' => $this->href,68),69$this->title);7071$header = phutil_tag(72'h2',73array(74'class' => 'remarkup-header',75),76$title);7778$subtitle = phutil_tag(79'div',80array(81'class' => 'phui-document-summary-subtitle',82),83$this->subtitle);8485$body = phutil_tag(86'div',87array(88'class' => 'phui-document-summary-body',89),90$this->summary);9192$read_more = phutil_tag(93'a',94array(95'class' => 'phui-document-read-more',96'href' => $this->href,97),98pht('Read more...'));99100return array($header, $subtitle, $body, $read_more);101}102103}104105106