Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F537751
PhabricatorHelpDocumentationController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
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
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 8:18 AM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
96881
Default Alt Text
PhabricatorHelpDocumentationController.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment