Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100358779
PHUIBigInfoExample.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
Thu, Jan 30, 05:11
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Feb 1, 05:11 (2 d)
Engine
blob
Format
Raw Data
Handle
23920375
Attached To
rPH Phabricator
PHUIBigInfoExample.php
View Options
<?php
final
class
PHUIBigInfoExample
extends
PhabricatorUIExample
{
public
function
getName
()
{
return
pht
(
'Big Info View'
);
}
public
function
getDescription
()
{
return
pht
(
'Basic New User State information block.'
);
}
public
function
renderExample
()
{
$request
=
$this
->
getRequest
();
$viewer
=
$request
->
getUser
();
$image
=
PhabricatorFile
::
loadBuiltin
(
$viewer
,
'projects/v3/rocket.png'
);
$button
=
id
(
new
PHUIButtonView
())
->
setTag
(
'a'
)
->
setText
(
pht
(
'Launch Away'
))
->
setColor
(
PHUIButtonView
::
GREEN
)
->
setHref
(
'#'
);
$views
=
array
();
$views
[]
=
id
(
new
PHUIBigInfoView
())
->
setTitle
(
pht
(
'Simply Slim'
))
->
setDescription
(
pht
(
'A simple description'
))
->
addAction
(
$button
);
$views
[]
=
id
(
new
PHUIBigInfoView
())
->
setTitle
(
pht
(
'Basicly Basic'
))
->
setIcon
(
'fa-rocket'
)
->
setDescription
(
pht
(
'A more basic description'
))
->
addAction
(
$button
);
$views
[]
=
id
(
new
PHUIBigInfoView
())
->
setTitle
(
pht
(
'A Modern Example'
))
->
setImage
(
$image
->
getBestURI
())
->
setDescription
(
pht
(
'A modern description with lots of frills.'
))
->
addAction
(
$button
);
return
phutil_tag_div
(
'ml'
,
$views
);
}
}
Event Timeline
Log In to Comment