mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 18:52:42 +01:00
8434143795
Summary: Ref T6822. Test Plan: `grep` Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6822 Differential Revision: https://secure.phabricator.com/D11368
68 lines
1.2 KiB
PHP
68 lines
1.2 KiB
PHP
<?php
|
|
|
|
final class DivinerBookItemView extends AphrontTagView {
|
|
|
|
private $title;
|
|
private $subtitle;
|
|
private $type;
|
|
private $href;
|
|
|
|
public function setTitle($title) {
|
|
$this->title = $title;
|
|
return $this;
|
|
}
|
|
|
|
public function setSubtitle($subtitle) {
|
|
$this->subtitle = $subtitle;
|
|
return $this;
|
|
}
|
|
|
|
public function setType($type) {
|
|
$this->type = $type;
|
|
return $this;
|
|
}
|
|
|
|
public function setHref($href) {
|
|
$this->href = $href;
|
|
return $this;
|
|
}
|
|
|
|
protected function getTagName() {
|
|
return 'a';
|
|
}
|
|
|
|
protected function getTagAttributes() {
|
|
return array(
|
|
'class' => 'diviner-book-item',
|
|
'href' => $this->href,
|
|
);
|
|
}
|
|
|
|
protected function getTagContent() {
|
|
require_celerity_resource('diviner-shared-css');
|
|
|
|
$title = phutil_tag(
|
|
'span',
|
|
array(
|
|
'class' => 'diviner-book-item-title',
|
|
),
|
|
$this->title);
|
|
|
|
$subtitle = phutil_tag(
|
|
'span',
|
|
array(
|
|
'class' => 'diviner-book-item-subtitle',
|
|
),
|
|
$this->subtitle);
|
|
|
|
$type = phutil_tag(
|
|
'span',
|
|
array(
|
|
'class' => 'diviner-book-item-type',
|
|
),
|
|
$this->type);
|
|
|
|
return array($title, $type, $subtitle);
|
|
}
|
|
|
|
}
|