Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIFeedStoryView.php
Show All 9 Lines | final class PHUIFeedStoryView extends AphrontView { | ||||
private $epoch; | private $epoch; | ||||
private $viewed; | private $viewed; | ||||
private $href; | private $href; | ||||
private $pontification = null; | private $pontification = null; | ||||
private $tokenBar = array(); | private $tokenBar = array(); | ||||
private $projects = array(); | private $projects = array(); | ||||
private $actions = array(); | private $actions = array(); | ||||
private $chronologicalKey; | private $chronologicalKey; | ||||
private $tags; | |||||
public function setTags($tags) { | |||||
$this->tags = $tags; | |||||
return $this; | |||||
} | |||||
public function getTags() { | |||||
return $this->tags; | |||||
} | |||||
public function setChronologicalKey($chronological_key) { | public function setChronologicalKey($chronological_key) { | ||||
$this->chronologicalKey = $chronological_key; | $this->chronologicalKey = $chronological_key; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getChronologicalKey() { | public function getChronologicalKey() { | ||||
return $this->chronologicalKey; | return $this->chronologicalKey; | ||||
▲ Show 20 Lines • Show All 204 Lines • ▼ Show 20 Lines | if ($body_content) { | ||||
$body = phutil_tag( | $body = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'phui-feed-story-body', | 'class' => 'phui-feed-story-body', | ||||
), | ), | ||||
$body_content); | $body_content); | ||||
} | } | ||||
$tags = null; | |||||
if ($this->tags) { | |||||
$tags = array( | |||||
" \xC2\xB7 ", | |||||
$this->tags); | |||||
} | |||||
$foot = phutil_tag( | $foot = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'phui-feed-story-foot', | 'class' => 'phui-feed-story-foot', | ||||
), | ), | ||||
array( | array( | ||||
$icon, | $icon, | ||||
$foot)); | $foot, | ||||
$tags, | |||||
)); | |||||
$classes = array('phui-feed-story'); | $classes = array('phui-feed-story'); | ||||
return id(new PHUIBoxView()) | return id(new PHUIBoxView()) | ||||
->addClass(implode(' ', $classes)) | ->addClass(implode(' ', $classes)) | ||||
->setBorder(true) | ->setBorder(true) | ||||
->addMargin(PHUI::MARGIN_MEDIUM_BOTTOM) | ->addMargin(PHUI::MARGIN_MEDIUM_BOTTOM) | ||||
->appendChild(array($head, $body, $foot)); | ->appendChild(array($head, $body, $foot)); | ||||
Show All 22 Lines |