Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F113192346
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, May 16, 00:26
Size
1 KB
Mime Type
text/x-php
Expires
Sun, May 18, 00:26 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
26191204
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
())
->
setWorkflow
(
$item
->
getWorkflow
())
->
setHref
(
$item
->
getHref
()));
}
$crumbs
=
$this
->
buildApplicationCrumbs
();
$crumbs
->
addTextCrumb
(
$title
);
return
$this
->
buildApplicationPage
(
array
(
$crumbs
,
$list
,
),
array
(
'title'
=>
$title
,
));
}
}
Event Timeline
Log In to Comment