1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-20 10:48:40 +01:00
phorge-phorge/src/applications/home/controller/PhabricatorHomeQuickCreateController.php
epriestley c169199e64 Allow applications to have multiple "help" menu items
Summary:
Ref T7199. Convert the single help menu item into a dropdown and allow applications to list multiple items there.

When an application has mail command objects, link them in the menu.

Test Plan:
{F355925}

{F355926}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7199

Differential Revision: https://secure.phabricator.com/D12244
2015-04-01 11:51:48 -07:00

35 lines
815 B
PHP

<?php
final class PhabricatorHomeQuickCreateController
extends PhabricatorHomeController {
public function processRequest() {
$viewer = $this->getRequest()->getUser();
$items = $this->getCurrentApplication()->loadAllQuickCreateItems($viewer);
$list = id(new PHUIObjectItemListView())
->setUser($viewer);
foreach ($items as $item) {
$list->addItem(
id(new PHUIObjectItemView())
->setHeader($item->getName())
->setWorkflow($item->getWorkflow())
->setHref($item->getHref()));
}
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Quick Create'));
return $this->buildApplicationPage(
array(
$crumbs,
$list,
),
array(
'title' => pht('Quick Create'),
));
}
}