Summary: Ref T6822. Test Plan: Visual inspection. These methods are only called from within `PhabricatorController` subclasses. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6822 Differential Revision: https://secure.phabricator.com/D11241
36 lines
870 B
PHP
36 lines
870 B
PHP
<?php
|
|
|
|
final class PhabricatorFileListController extends PhabricatorFileController {
|
|
|
|
private $key;
|
|
|
|
public function shouldAllowPublic() {
|
|
return true;
|
|
}
|
|
|
|
public function willProcessRequest(array $data) {
|
|
$this->key = idx($data, 'key');
|
|
}
|
|
|
|
public function processRequest() {
|
|
$controller = id(new PhabricatorApplicationSearchController())
|
|
->setQueryKey($this->key)
|
|
->setSearchEngine(new PhabricatorFileSearchEngine())
|
|
->setNavigation($this->buildSideNavView());
|
|
|
|
return $this->delegateToController($controller);
|
|
}
|
|
|
|
protected function buildApplicationCrumbs() {
|
|
$crumbs = parent::buildApplicationCrumbs();
|
|
$crumbs->addAction(
|
|
id(new PHUIListItemView())
|
|
->setName(pht('Upload File'))
|
|
->setIcon('fa-upload')
|
|
->setHref($this->getApplicationURI('/upload/')));
|
|
|
|
return $crumbs;
|
|
}
|
|
|
|
}
|