3 final class PhameNextPostView
extends AphrontTagView
{
7 private $previousTitle;
10 public function setNext($title, $href) {
11 $this->nextTitle
= $title;
12 $this->nextHref
= $href;
16 public function setPrevious($title, $href) {
17 $this->previousTitle
= $title;
18 $this->previousHref
= $href;
22 protected function getTagAttributes() {
24 $classes[] = 'phame-next-post-view';
25 $classes[] = 'grouped';
26 return array('class' => implode(' ', $classes));
29 protected function getTagContent() {
30 require_celerity_resource('phame-css');
32 $p_icon = id(new PHUIIconView())
33 ->setIcon('fa-angle-left');
35 $previous_icon = phutil_tag(
38 'class' => 'phame-previous-arrow',
42 $previous_text = phutil_tag(
45 'class' => 'phame-previous-header',
47 pht('Previous Post'));
49 $previous_title = phutil_tag(
52 'class' => 'phame-previous-title',
54 $this->previousTitle
);
57 if ($this->previousHref
) {
58 $previous = phutil_tag(
61 'class' => 'phame-previous',
62 'href' => $this->previousHref
,
71 $n_icon = id(new PHUIIconView())
72 ->setIcon('fa-angle-right');
74 $next_icon = phutil_tag(
77 'class' => 'phame-next-arrow',
81 $next_text = phutil_tag(
84 'class' => 'phame-next-header',
88 $next_title = phutil_tag(
91 'class' => 'phame-next-title',
96 if ($this->nextHref
) {
100 'class' => 'phame-next',
101 'href' => $this->nextHref
,
110 return array($previous, $next);