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 {
|
final class PhabricatorUIExampleRenderController extends PhabricatorController {
|
||||||
|
|
||||||
private $class;
|
|
||||||
|
|
||||||
public function shouldAllowPublic() {
|
public function shouldAllowPublic() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function willProcessRequest(array $data) {
|
public function handleRequest(AphrontRequest $request) {
|
||||||
$this->class = idx($data, 'class');
|
$id = $request->getURIData('class');
|
||||||
}
|
|
||||||
|
|
||||||
public function processRequest() {
|
|
||||||
|
|
||||||
$classes = id(new PhutilSymbolLoader())
|
$classes = id(new PhutilSymbolLoader())
|
||||||
->setAncestorClass('PhabricatorUIExample')
|
->setAncestorClass('PhabricatorUIExample')
|
||||||
|
@ -27,7 +22,7 @@ final class PhabricatorUIExampleRenderController extends PhabricatorController {
|
||||||
$nav->addFilter($class, $name);
|
$nav->addFilter($class, $name);
|
||||||
}
|
}
|
||||||
|
|
||||||
$selected = $nav->selectFilter($this->class, head_key($classes));
|
$selected = $nav->selectFilter($id, head_key($classes));
|
||||||
|
|
||||||
$example = $classes[$selected];
|
$example = $classes[$selected];
|
||||||
$example->setRequest($this->getRequest());
|
$example->setRequest($this->getRequest());
|
||||||
|
|
Loading…
Reference in a new issue