Path: blob/master/src/applications/home/controller/PhabricatorHomeMenuItemController.php
12256 views
<?php12final class PhabricatorHomeMenuItemController3extends PhabricatorHomeController {45public function shouldAllowPublic() {6return true;7}89public function isGlobalDragAndDropUploadEnabled() {10return true;11}1213public function handleRequest(AphrontRequest $request) {14$viewer = $this->getViewer();1516// Test if we should show mobile users the menu or the page content:17// if you visit "/", you just get the menu. If you visit "/home/", you18// get the content.19$is_content = $request->getURIData('content');2021$application = 'PhabricatorHomeApplication';22$home_app = id(new PhabricatorApplicationQuery())23->setViewer($viewer)24->withClasses(array($application))25->withInstalled(true)26->executeOne();2728$engine = id(new PhabricatorHomeProfileMenuEngine())29->setProfileObject($home_app)30->setCustomPHID($viewer->getPHID())31->setController($this)32->setShowContentCrumbs(false);3334if (!$is_content) {35$engine->addContentPageClass('phabricator-home');36}3738return $engine->buildResponse();39}4041}424344