Path: blob/master/src/applications/diviner/view/DivinerBookItemView.php
12256 views
<?php12final class DivinerBookItemView extends AphrontTagView {34private $title;5private $subtitle;6private $type;7private $href;89public function setTitle($title) {10$this->title = $title;11return $this;12}1314public function setSubtitle($subtitle) {15$this->subtitle = $subtitle;16return $this;17}1819public function setType($type) {20$this->type = $type;21return $this;22}2324public function setHref($href) {25$this->href = $href;26return $this;27}2829protected function getTagName() {30return 'a';31}3233protected function getTagAttributes() {34return array(35'class' => 'diviner-book-item',36'href' => $this->href,37);38}3940protected function getTagContent() {41require_celerity_resource('diviner-shared-css');4243$title = phutil_tag(44'span',45array(46'class' => 'diviner-book-item-title',47),48$this->title);4950$subtitle = phutil_tag(51'span',52array(53'class' => 'diviner-book-item-subtitle',54),55$this->subtitle);5657$type = phutil_tag(58'span',59array(60'class' => 'diviner-book-item-type',61),62$this->type);6364return array($title, $type, $subtitle);65}6667}686970