[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorMainMenuIconView extends AphrontView { 4 5 private $classes = array(); 6 private $href; 7 private $name; 8 private $workflow; 9 private $style; 10 11 public function setName($name) { 12 $this->name = $name; 13 return $this; 14 } 15 16 public function setWorkflow($workflow) { 17 $this->workflow = $workflow; 18 return $this; 19 } 20 21 public function getName() { 22 return $this->name; 23 } 24 25 public function setHref($href) { 26 $this->href = $href; 27 return $this; 28 } 29 30 public function getHref() { 31 return $this->href; 32 } 33 34 public function addClass($class) { 35 $this->classes[] = $class; 36 return $this; 37 } 38 39 public function addStyle($style) { 40 $this->style = $style; 41 return $this; 42 } 43 44 public function render() { 45 $name = $this->getName(); 46 $href = $this->getHref(); 47 48 $classes = $this->classes; 49 $classes[] = 'phabricator-main-menu-icon'; 50 51 $label = javelin_tag( 52 'a', 53 array( 54 'href' => $href, 55 'class' => 'phabricator-main-menu-icon-label', 56 ), 57 $name); 58 59 $item = javelin_tag( 60 'a', 61 array( 62 'href' => $href, 63 'class' => implode(' ', $classes), 64 'style' => $this->style, 65 'sigil' => $this->workflow ? 'workflow' : null, 66 ), 67 ''); 68 69 $group = new PhabricatorMainMenuGroupView(); 70 $group->appendChild($item); 71 $group->appendChild($label); 72 73 return $group->render(); 74 } 75 76 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |