2014-01-29 05:18:01 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorHomeQuickCreateController
|
|
|
|
extends PhabricatorHomeController {
|
|
|
|
|
|
|
|
public function processRequest() {
|
|
|
|
$viewer = $this->getRequest()->getUser();
|
|
|
|
|
2014-01-29 05:19:20 +01:00
|
|
|
$items = $this->getCurrentApplication()->loadAllQuickCreateItems($viewer);
|
2014-01-29 05:18:01 +01:00
|
|
|
|
|
|
|
$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'),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|