1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-03 04:02:43 +01:00
phorge-phorge/src/applications/uiexample/examples/PhabricatorSetupIssueExample.php
epriestley fb59101cde Use phutil_tag in Setup issue stuff
Summary: These are pretty straightforward, they just have a fair amount of instructional text with inline markup.

Test Plan: Added and viewed a UIExample.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4686
2013-01-29 11:29:56 -08:00

38 lines
1 KiB
PHP

<?php
final class PhabricatorSetupIssueExample extends PhabricatorUIExample {
public function getName() {
return 'Setup Issue';
}
public function getDescription() {
return 'Setup errors and warnings.';
}
public function renderExample() {
$request = $this->getRequest();
$user = $request->getUser();
$issue = id(new PhabricatorSetupIssue())
->setShortName(pht('Short Name'))
->setName(pht('Name'))
->setSummary(pht('Summary'))
->setMessage(pht('Message'))
->setIssueKey('example.key')
->addCommand('$ # Add Command')
->addCommand(hsprintf('<tt>$</tt> %s', '$ ls -1 > /dev/null'))
->addPHPConfig('php.config.example')
->addPhabricatorConfig('test.value')
->addPHPExtension('libexample');
// NOTE: Since setup issues may be rendered before we can build the page
// chrome, they don't explicitly include resources.
require_celerity_resource('setup-issue-css');
$view = id(new PhabricatorSetupIssueView())
->setIssue($issue);
return $view;
}
}