mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-20 05:42:40 +01:00
Update UIExamples for handleRequest
Summary: Updates UIExamples Test Plan: Visit application, click on different examples Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T8628 Differential Revision: https://secure.phabricator.com/D13769
This commit is contained in:
parent
deb06727ea
commit
9c39a9b361
1 changed files with 3 additions and 8 deletions
|
@ -2,17 +2,12 @@
|
|||
|
||||
final class PhabricatorUIExampleRenderController extends PhabricatorController {
|
||||
|
||||
private $class;
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function willProcessRequest(array $data) {
|
||||
$this->class = idx($data, 'class');
|
||||
}
|
||||
|
||||
public function processRequest() {
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$id = $request->getURIData('class');
|
||||
|
||||
$classes = id(new PhutilSymbolLoader())
|
||||
->setAncestorClass('PhabricatorUIExample')
|
||||
|
@ -27,7 +22,7 @@ final class PhabricatorUIExampleRenderController extends PhabricatorController {
|
|||
$nav->addFilter($class, $name);
|
||||
}
|
||||
|
||||
$selected = $nav->selectFilter($this->class, head_key($classes));
|
||||
$selected = $nav->selectFilter($id, head_key($classes));
|
||||
|
||||
$example = $classes[$selected];
|
||||
$example->setRequest($this->getRequest());
|
||||
|
|
Loading…
Reference in a new issue