[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PHUIButtonBarExample extends PhabricatorUIExample { 4 5 public function getName() { 6 return pht('Button Bar'); 7 } 8 9 public function getDescription() { 10 return pht('A minimal UI for Buttons'); 11 } 12 13 public function renderExample() { 14 $request = $this->getRequest(); 15 $user = $request->getUser(); 16 17 // Icon Buttons 18 $icons = array( 19 'Go Back' => 'fa-chevron-left bluegrey', 20 'Choose Date' => 'fa-calendar bluegrey', 21 'Edit View' => 'fa-pencil bluegrey', 22 'Go Forward' => 'fa-chevron-right bluegrey', 23 ); 24 $button_bar = new PHUIButtonBarView(); 25 foreach ($icons as $text => $icon) { 26 $image = id(new PHUIIconView()) 27 ->setIconFont($icon); 28 $button = id(new PHUIButtonView()) 29 ->setTag('a') 30 ->setColor(PHUIButtonView::GREY) 31 ->setTitle($text) 32 ->setIcon($image); 33 34 $button_bar->addButton($button); 35 } 36 37 $layout = id(new PHUIBoxView()) 38 ->appendChild($button_bar) 39 ->addPadding(PHUI::PADDING_LARGE); 40 41 $wrap1 = id(new PHUIObjectBoxView()) 42 ->setHeaderText('Button Bar Example') 43 ->appendChild($layout); 44 45 return array($wrap1); 46 } 47 }
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 |