Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102833916
DivinerLegacyController.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
Mon, Feb 24, 16:15
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Feb 26, 16:15 (1 d, 19 h)
Engine
blob
Format
Raw Data
Handle
24404951
Attached To
rPH Phabricator
DivinerLegacyController.php
View Options
<?php
final
class
DivinerLegacyController
extends
DivinerController
{
public
function
processRequest
()
{
// TODO: Temporary implementation until Diviner is up and running inside
// Phabricator.
$links
=
array
(
'http://www.phabricator.com/docs/phabricator/'
=>
array
(
'name'
=>
'Phabricator Ducks'
,
'flavor'
=>
'Oops, that should say "Docs".'
,
),
'http://www.phabricator.com/docs/arcanist/'
=>
array
(
'name'
=>
'Arcanist Docs'
,
'flavor'
=>
'Words have never been so finely crafted.'
,
),
'http://www.phabricator.com/docs/libphutil/'
=>
array
(
'name'
=>
'libphutil Docs'
,
'flavor'
=>
'Soothing prose; seductive poetry.'
,
),
'http://www.phabricator.com/docs/javelin/'
=>
array
(
'name'
=>
'Javelin Docs'
,
'flavor'
=>
'O, what noble scribe hath penned these words?'
,
),
);
$request
=
$this
->
getRequest
();
$viewer
=
$request
->
getUser
();
$list
=
id
(
new
PHUIObjectItemListView
())
->
setUser
(
$viewer
)
->
setPlain
(
true
);
foreach
(
$links
as
$href
=>
$link
)
{
$item
=
id
(
new
PHUIObjectItemView
())
->
setHref
(
$href
)
->
setHeader
(
$link
[
'name'
])
->
addAttribute
(
$link
[
'flavor'
]);
$list
->
addItem
(
$item
);
}
$crumbs
=
$this
->
buildApplicationCrumbs
();
$crumbs
->
addCrumb
(
id
(
new
PhabricatorCrumbView
())
->
setName
(
pht
(
'Documentation'
)));
$header
=
id
(
new
PhabricatorHeaderView
())
->
setHeader
(
pht
(
'Documentation'
));
$document
=
new
PHUIDocumentView
();
$document
->
setHeader
(
$header
);
$document
->
appendChild
(
$list
);
return
$this
->
buildApplicationPage
(
array
(
$crumbs
,
$document
,
),
array
(
'title'
=>
pht
(
'Documentation'
),
'device'
=>
true
,
));
}
}
Event Timeline
Log In to Comment