mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-01 03:02:43 +01:00
dfee1352e9
Summary: Ref T11957, builds out `/home/menu/` as a basic structure for adding/editing the homepage menu. Test Plan: visit `/home/menu/` and add items to global and personal. Not wired to anything. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T11957 Differential Revision: https://secure.phabricator.com/D17180
29 lines
757 B
PHP
29 lines
757 B
PHP
<?php
|
|
|
|
final class PhabricatorHomeMenuItemController
|
|
extends PhabricatorHomeController {
|
|
|
|
public function handleRequest(AphrontRequest $request) {
|
|
$viewer = $this->getViewer();
|
|
$type = $request->getURIData('type');
|
|
$custom_phid = null;
|
|
if ($type == 'personal') {
|
|
$custom_phid = $viewer->getPHID();
|
|
}
|
|
|
|
$application = 'PhabricatorHomeApplication';
|
|
$home_app = id(new PhabricatorApplicationQuery())
|
|
->setViewer($viewer)
|
|
->withClasses(array($application))
|
|
->withInstalled(true)
|
|
->executeOne();
|
|
|
|
$engine = id(new PhabricatorHomeProfileMenuEngine())
|
|
->setProfileObject($home_app)
|
|
->setCustomPHID($custom_phid)
|
|
->setController($this);
|
|
|
|
return $engine->buildResponse();
|
|
}
|
|
|
|
}
|