Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIIconView.php
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | final class PHUIIconView extends AphrontTagView { | ||||
} | } | ||||
public function setIconFont($icon, $color = null) { | public function setIconFont($icon, $color = null) { | ||||
$this->iconFont = $icon; | $this->iconFont = $icon; | ||||
$this->iconColor = $color; | $this->iconColor = $color; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getTagName() { | protected function getTagName() { | ||||
$tag = 'span'; | $tag = 'span'; | ||||
if ($this->href) { | if ($this->href) { | ||||
$tag = 'a'; | $tag = 'a'; | ||||
} | } | ||||
return $tag; | return $tag; | ||||
} | } | ||||
public function getTagAttributes() { | protected function getTagAttributes() { | ||||
require_celerity_resource('phui-icon-view-css'); | require_celerity_resource('phui-icon-view-css'); | ||||
$style = null; | $style = null; | ||||
$classes = array(); | $classes = array(); | ||||
$classes[] = 'phui-icon-view'; | $classes[] = 'phui-icon-view'; | ||||
if ($this->spriteIcon) { | if ($this->spriteIcon) { | ||||
require_celerity_resource('sprite-'.$this->spriteSheet.'-css'); | require_celerity_resource('sprite-'.$this->spriteSheet.'-css'); | ||||
▲ Show 20 Lines • Show All 556 Lines • Show Last 20 Lines |