buildStandardPageView(); $page->setApplicationName('Herald'); $page->setBaseURI('/herald/'); $page->setTitle(idx($data, 'title')); $page->setGlyph("\xE2\x98\xBF"); $page->appendChild($view); $doclink = PhabricatorEnv::getDoclink('article/Herald_User_Guide.html'); $tabs = array( 'rules' => array( 'href' => '/herald/', 'name' => 'Rules', ), 'test' => array( 'href' => '/herald/test/', 'name' => 'Test Console', ), 'transcripts' => array( 'href' => '/herald/transcript/', 'name' => 'Transcripts', ), 'help' => array( 'href' => $doclink, 'name' => 'Help', ), ); $user = $this->getRequest()->getUser(); if ($user->getIsAdmin()) { $tabs['all'] = array( 'href' => '/herald/all', 'name' => 'All Rules', ); } $page->setTabs( $tabs, idx($data, 'tab')); $response = new AphrontWebpageResponse(); return $response->setContent($page->render()); } }