1
0
Fork 0
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:
Chad Little 2015-08-01 15:40:26 -07:00
parent deb06727ea
commit 9c39a9b361

View file

@ -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());