[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class DivinerBookItemView extends AphrontTagView { 4 5 private $title; 6 private $subtitle; 7 private $type; 8 private $href; 9 10 public function setTitle($title) { 11 $this->title = $title; 12 return $this; 13 } 14 15 public function setSubtitle($subtitle) { 16 $this->subtitle = $subtitle; 17 return $this; 18 } 19 20 public function setType($type) { 21 $this->type = $type; 22 return $this; 23 } 24 25 public function setHref($href) { 26 $this->href = $href; 27 return $this; 28 } 29 30 public function getTagName() { 31 return 'a'; 32 } 33 34 public function getTagAttributes() { 35 return array( 36 'class' => 'diviner-book-item', 37 'href' => $this->href, 38 ); 39 } 40 41 public function getTagContent() { 42 require_celerity_resource('diviner-shared-css'); 43 44 $title = phutil_tag( 45 'span', 46 array( 47 'class' => 'diviner-book-item-title', 48 ), 49 $this->title); 50 51 $subtitle = phutil_tag( 52 'span', 53 array( 54 'class' => 'diviner-book-item-subtitle', 55 ), 56 $this->subtitle); 57 58 $type = phutil_tag( 59 'span', 60 array( 61 'class' => 'diviner-book-item-type', 62 ), 63 $this->type); 64 65 return array($title, $type, $subtitle); 66 } 67 68 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |