Remove product literal strings in "pht()", part 5
[phabricator.git] / src / applications / guides / controller / PhabricatorGuideModuleController.php
blobbc34b650ffa4421a3a9983989ca63f496dccde52
1 <?php
3 final class PhabricatorGuideModuleController
4 extends PhabricatorGuideController {
6 public function handleRequest(AphrontRequest $request) {
7 $viewer = $this->getViewer();
8 $key = $request->getURIData('module');
10 $all_modules = PhabricatorGuideModule::getEnabledModules();
12 if (!$key) {
13 $key = key($all_modules);
16 $nav = $this->buildSideNavView();
17 $nav->selectFilter($key.'/');
19 $module = $all_modules[$key];
20 $content = $module->renderModuleStatus($request);
21 $title = $module->getModuleName();
23 $crumbs = $this->buildApplicationCrumbs();
24 $crumbs->addTextCrumb($title);
25 $crumbs->setBorder(true);
27 $header = id(new PHUIHeaderView())
28 ->setHeader($title)
29 ->setProfileHeader(true);
31 $view = id(new PHUICMSView())
32 ->setCrumbs($crumbs)
33 ->setNavigation($nav)
34 ->setHeader($header)
35 ->setContent($content);
37 return $this->newPage()
38 ->setTitle($title)
39 ->addClass('phui-cms-body')
40 ->appendChild($view);