1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 00:02:41 +01:00
phorge-phorge/src/applications/drydock/controller/DrydockBlueprintListController.php
Chad Little c026152833 Update Drydock for handleRequest
Summary: Poked through the Drydock controllers and updated the codes.

Test Plan: Built random fake stuff in Drydock

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13731
2015-07-27 07:56:52 -07:00

36 lines
1 KiB
PHP

<?php
final class DrydockBlueprintListController extends DrydockBlueprintController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$querykey = $request->getURIData('queryKey');
$request = $this->getRequest();
$controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($querykey)
->setSearchEngine(new DrydockBlueprintSearchEngine())
->setNavigation($this->buildSideNavView());
return $this->delegateToController($controller);
}
protected function buildApplicationCrumbs() {
$can_create = $this->hasApplicationCapability(
DrydockCreateBlueprintsCapability::CAPABILITY);
$crumbs = parent::buildApplicationCrumbs();
$crumbs->addAction(
id(new PHUIListItemView())
->setName(pht('New Blueprint'))
->setHref($this->getApplicationURI('/blueprint/create/'))
->setDisabled(!$can_create)
->setWorkflow(!$can_create)
->setIcon('fa-plus-square'));
return $crumbs;
}
}