Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104878408
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
Thu, Mar 13, 02:13
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Mar 15, 02:13 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24871394
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
->
newPage
()
->
setTitle
(
$title
)
->
setCrumbs
(
$crumbs
)
->
appendChild
(
$list
);
}
}
Event Timeline
Log In to Comment