3 final class FuelMenuItemView
10 private $backgroundColor;
12 public function setURI($uri) {
17 public function getURI() {
21 public function setName($name) {
26 public function getName() {
30 public function setIcon(PHUIIconView
$icon) {
35 public function getIcon() {
39 public function newIcon() {
40 $icon = new PHUIIconView();
41 $this->setIcon($icon);
45 public function setDisabled($disabled) {
46 $this->disabled
= $disabled;
50 public function getDisabled() {
51 return $this->disabled
;
54 public function setBackgroundColor($background_color) {
55 $this->backgroundColor
= $background_color;
59 public function getBackgroundColor() {
60 return $this->backgroundColor
;
63 public function render() {
64 $icon = $this->getIcon();
66 $name = $this->getName();
67 $uri = $this->getURI();
72 'class' => 'fuel-menu-item-icon',
76 $item_link = phutil_tag(
80 'class' => 'fuel-menu-item-link',
88 $classes[] = 'fuel-menu-item';
90 if ($this->getDisabled()) {
91 $classes[] = 'disabled';
94 $background_color = $this->getBackgroundColor();
95 if ($background_color !== null) {
96 $classes[] = 'fuel-menu-item-background-color-'.$background_color;
101 $classes[] = 'has-link';
104 $classes = implode(' ', $classes);