Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97252015
PhabricatorHelpDocumentationController.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
Fri, Jan 3, 19:34
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Jan 5, 19:34 (2 d)
Engine
blob
Format
Raw Data
Handle
23365156
Attached To
rPH Phabricator
PhabricatorHelpDocumentationController.php
View Options
<?php
final
class
PhabricatorHelpDocumentationController
extends
PhabricatorHelpController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$this
->
getViewer
();
$application_class
=
$request
->
getURIData
(
'application'
);
$application
=
id
(
new
PhabricatorApplicationQuery
())
->
setViewer
(
$viewer
)
->
withClasses
(
array
(
$application_class
))
->
executeOne
();
if
(!
$application
)
{
return
new
Aphront404Response
();
}
$items
=
$application
->
getHelpMenuItems
(
$viewer
);
$title
=
pht
(
'%s Help'
,
$application
->
getName
());
$list
=
id
(
new
PHUIObjectItemListView
())
->
setUser
(
$viewer
);
foreach
(
$items
as
$item
)
{
if
(
$item
->
getType
()
==
PHUIListItemView
::
TYPE_LABEL
)
{
continue
;
}
$list
->
addItem
(
id
(
new
PHUIObjectItemView
())
->
setHeader
(
$item
->
getName
())
->
setHref
(
$item
->
getHref
()));
}
$crumbs
=
$this
->
buildApplicationCrumbs
();
$crumbs
->
addTextCrumb
(
$title
);
return
$this
->
newPage
()
->
setTitle
(
$title
)
->
setCrumbs
(
$crumbs
)
->
appendChild
(
$list
);
}
}
Event Timeline
Log In to Comment