Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2893630
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/applications/uiexample/controller/PhabricatorUIExampleRenderController.php b/src/applications/uiexample/controller/PhabricatorUIExampleRenderController.php
index b05a625a36..c56332fcdb 100644
--- a/src/applications/uiexample/controller/PhabricatorUIExampleRenderController.php
+++ b/src/applications/uiexample/controller/PhabricatorUIExampleRenderController.php
@@ -1,67 +1,66 @@
<?php
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() {
$classes = id(new PhutilSymbolLoader())
->setAncestorClass('PhabricatorUIExample')
->loadObjects();
$classes = msort($classes, 'getName');
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI('view/')));
foreach ($classes as $class => $obj) {
$name = $obj->getName();
$nav->addFilter($class, $name);
}
$selected = $nav->selectFilter($this->class, head_key($classes));
$example = $classes[$selected];
$example->setRequest($this->getRequest());
$result = $example->renderExample();
if ($result instanceof AphrontResponse) {
// This allows examples to generate dialogs, etc., for demonstration.
return $result;
}
require_celerity_resource('phabricator-ui-example-css');
$crumbs = $this->buildApplicationCrumbs();
$crumbs->setBorder(true);
$crumbs->addTextCrumb($example->getName());
$header = id(new PHUIHeaderView())
->setHeader(pht('%s (%s)', $example->getName(), get_class($example)))
->setSubheader($example->getDescription())
->setNoBackground(true);
$nav->appendChild(
array(
$crumbs,
$header,
- phutil_tag('br'),
$result,
));
return $this->buildApplicationPage(
$nav,
array(
'title' => $example->getName(),
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jan 19, 18:47 (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127550
Default Alt Text
(2 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment