2013-07-03 20:15:45 +02:00
|
|
|
<?php
|
|
|
|
|
2014-05-09 21:25:52 +02:00
|
|
|
final class LegalpadDocumentListController extends LegalpadController {
|
2013-07-03 20:15:45 +02:00
|
|
|
|
|
|
|
private $queryKey;
|
|
|
|
|
|
|
|
public function willProcessRequest(array $data) {
|
|
|
|
$this->queryKey = idx($data, 'queryKey');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function processRequest() {
|
|
|
|
$request = $this->getRequest();
|
|
|
|
$controller = id(new PhabricatorApplicationSearchController($request))
|
|
|
|
->setQueryKey($this->queryKey)
|
|
|
|
->setSearchEngine(new LegalpadDocumentSearchEngine())
|
|
|
|
->setNavigation($this->buildSideNav());
|
|
|
|
|
|
|
|
return $this->delegateToController($controller);
|
|
|
|
}
|
|
|
|
|
2014-06-26 03:38:07 +02:00
|
|
|
public function buildApplicationCrumbs() {
|
|
|
|
$crumbs = parent::buildApplicationCrumbs();
|
|
|
|
|
|
|
|
$crumbs->addAction(
|
|
|
|
id(new PHUIListItemView())
|
|
|
|
->setName(pht('Create Document'))
|
|
|
|
->setHref($this->getApplicationURI('create/'))
|
|
|
|
->setIcon('fa-plus-square'));
|
|
|
|
|
|
|
|
return $crumbs;
|
|
|
|
}
|
|
|
|
|
2013-07-03 20:15:45 +02:00
|
|
|
}
|