@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class PhabricatorSetupIssueUIExample extends PhabricatorUIExample {
4
5 public function getName() {
6 return pht('Setup Issue');
7 }
8
9 public function getDescription() {
10 return pht('Setup errors and warnings.');
11 }
12
13 public function getCategory() {
14 return pht('Single Use');
15 }
16
17 public function renderExample() {
18 $request = $this->getRequest();
19 $user = $request->getUser();
20
21 $issue = id(new PhabricatorSetupIssue())
22 ->setShortName(pht('Short Name'))
23 ->setName(pht('Name'))
24 ->setSummary(pht('Summary'))
25 ->setMessage(pht('Message'))
26 ->setIssueKey('example.key')
27 ->addCommand(hsprintf(
28 '<samp>%s $</samp># Add Command',
29 PlatformSymbols::getPlatformServerPath()))
30 ->addCommand(hsprintf(
31 '<samp>%s $</samp><kbd>ls -1 > /dev/null</kbd>',
32 PlatformSymbols::getPlatformServerPath()))
33 ->addPHPConfig('php.config.example')
34 ->addPhabricatorConfig('test.value')
35 ->addPHPExtension('libexample');
36
37 // NOTE: Since setup issues may be rendered before we can build the page
38 // chrome, they don't explicitly include resources.
39 require_celerity_resource('setup-issue-css');
40
41 $view = id(new PhabricatorSetupIssueView())
42 ->setIssue($issue);
43
44 return $view;
45 }
46}