[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorConfigListController 4 extends PhabricatorConfigController { 5 6 public function processRequest() { 7 $request = $this->getRequest(); 8 $user = $request->getUser(); 9 10 $nav = $this->buildSideNavView(); 11 $nav->selectFilter('/'); 12 13 $groups = PhabricatorApplicationConfigOptions::loadAll(); 14 $list = $this->buildConfigOptionsList($groups); 15 16 $title = pht('Phabricator Configuration'); 17 18 $box = id(new PHUIObjectBoxView()) 19 ->setHeaderText($title) 20 ->appendChild($list); 21 22 $nav->appendChild( 23 array( 24 $box, 25 )); 26 27 $crumbs = $this 28 ->buildApplicationCrumbs() 29 ->addTextCrumb(pht('Config'), $this->getApplicationURI()); 30 31 $nav->setCrumbs($crumbs); 32 33 return $this->buildApplicationPage( 34 $nav, 35 array( 36 'title' => $title, 37 )); 38 } 39 40 private function buildConfigOptionsList(array $groups) { 41 assert_instances_of($groups, 'PhabricatorApplicationConfigOptions'); 42 43 $list = new PHUIObjectItemListView(); 44 $list->setStackable(true); 45 $groups = msort($groups, 'getName'); 46 foreach ($groups as $group) { 47 $item = id(new PHUIObjectItemView()) 48 ->setHeader($group->getName()) 49 ->setHref('/config/group/'.$group->getKey().'/') 50 ->addAttribute($group->getDescription()); 51 $list->addItem($item); 52 } 53 54 return $list; 55 } 56 57 }
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 |