Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91984963
PhabricatorSetupIssueUIExample.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 16, 09:26
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Nov 18, 09:26 (2 d)
Engine
blob
Format
Raw Data
Handle
22356866
Attached To
rPH Phabricator
PhabricatorSetupIssueUIExample.php
View Options
<?php
final
class
PhabricatorSetupIssueUIExample
extends
PhabricatorUIExample
{
public
function
getName
()
{
return
pht
(
'Setup Issue'
);
}
public
function
getDescription
()
{
return
pht
(
'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
;
}
}
Event Timeline
Log In to Comment