Remove all "FileHasObject" edge reads and writes
[phabricator.git] / src / applications / diviner / view / DivinerBookItemView.php
blob5abf43638fa61a13720963218f2ebbfd7963d16b
1 <?php
3 final class DivinerBookItemView extends AphrontTagView {
5 private $title;
6 private $subtitle;
7 private $type;
8 private $href;
10 public function setTitle($title) {
11 $this->title = $title;
12 return $this;
15 public function setSubtitle($subtitle) {
16 $this->subtitle = $subtitle;
17 return $this;
20 public function setType($type) {
21 $this->type = $type;
22 return $this;
25 public function setHref($href) {
26 $this->href = $href;
27 return $this;
30 protected function getTagName() {
31 return 'a';
34 protected function getTagAttributes() {
35 return array(
36 'class' => 'diviner-book-item',
37 'href' => $this->href,
41 protected function getTagContent() {
42 require_celerity_resource('diviner-shared-css');
44 $title = phutil_tag(
45 'span',
46 array(
47 'class' => 'diviner-book-item-title',
49 $this->title);
51 $subtitle = phutil_tag(
52 'span',
53 array(
54 'class' => 'diviner-book-item-subtitle',
56 $this->subtitle);
58 $type = phutil_tag(
59 'span',
60 array(
61 'class' => 'diviner-book-item-type',
63 $this->type);
65 return array($title, $type, $subtitle);