mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-20 10:48:40 +01:00
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
35 lines
815 B
PHP
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'),
|
|
));
|
|
}
|
|
|
|
}
|