Path: blob/master/src/view/layout/AphrontMoreView.php
12241 views
<?php12final class AphrontMoreView extends AphrontView {34private $some;5private $more;6private $expandtext;78public function setSome($some) {9$this->some = $some;10return $this;11}1213public function setMore($more) {14$this->more = $more;15return $this;16}1718public function setExpandText($text) {19$this->expandtext = $text;20return $this;21}2223public function render() {2425$content = array();26$content[] = $this->some;2728if ($this->more && $this->more != $this->some) {29$text = "(".pht('Show More')."\xE2\x80\xA6)";30if ($this->expandtext !== null) {31$text = $this->expandtext;32}3334Javelin::initBehavior('aphront-more');35$content[] = ' ';36$content[] = javelin_tag(37'a',38array(39'sigil' => 'aphront-more-view-show-more',40'mustcapture' => true,41'href' => '#',42'meta' => array(43'more' => $this->more,44),45),46$text);47}4849return javelin_tag(50'div',51array(52'sigil' => 'aphront-more-view',53),54$content);55}56}575859