Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conpherence/view/ConpherenceMenuItemView.php
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | final class ConpherenceMenuItemView extends AphrontTagView { | ||||
protected function getTagContent() { | protected function getTagContent() { | ||||
$image = null; | $image = null; | ||||
if ($this->imageURI) { | if ($this->imageURI) { | ||||
$image = phutil_tag( | $image = phutil_tag( | ||||
'span', | 'span', | ||||
array( | array( | ||||
'class' => 'conpherence-menu-item-image', | 'class' => 'conpherence-menu-item-image', | ||||
'style' => 'background-image: url('.$this->imageURI.');' | 'style' => 'background-image: url('.$this->imageURI.');', | ||||
), | ), | ||||
''); | ''); | ||||
} | } | ||||
$title = null; | $title = null; | ||||
if ($this->title) { | if ($this->title) { | ||||
$title = phutil_tag( | $title = phutil_tag( | ||||
'span', | 'span', | ||||
array( | array( | ||||
Show All 10 Lines | if ($this->subtitle) { | ||||
), | ), | ||||
$this->subtitle); | $this->subtitle); | ||||
} | } | ||||
$unread_count = null; | $unread_count = null; | ||||
if ($this->unreadCount) { | if ($this->unreadCount) { | ||||
$unread_count = phutil_tag( | $unread_count = phutil_tag( | ||||
'span', | 'span', | ||||
array( | array( | ||||
'class' => 'conpherence-menu-item-unread-count' | 'class' => 'conpherence-menu-item-unread-count', | ||||
), | ), | ||||
(int)$this->unreadCount); | (int)$this->unreadCount); | ||||
} | } | ||||
return array( | return array( | ||||
$image, | $image, | ||||
$title, | $title, | ||||
$subtitle, | $subtitle, | ||||
$unread_count, | $unread_count, | ||||
); | ); | ||||
} | } | ||||
} | } |