Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104624173
PhabricatorHomeMenuItemController.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
Tue, Mar 11, 00:12
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Mar 13, 00:12 (2 d)
Engine
blob
Format
Raw Data
Handle
24817733
Attached To
rPH Phabricator
PhabricatorHomeMenuItemController.php
View Options
<?php
final
class
PhabricatorHomeMenuItemController
extends
PhabricatorHomeController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
isGlobalDragAndDropUploadEnabled
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$this
->
getViewer
();
// Test if we should show mobile users the menu or the page content:
// if you visit "/", you just get the menu. If you visit "/home/", you
// get the content.
$is_content
=
$request
->
getURIData
(
'content'
);
$application
=
'PhabricatorHomeApplication'
;
$home_app
=
id
(
new
PhabricatorApplicationQuery
())
->
setViewer
(
$viewer
)
->
withClasses
(
array
(
$application
))
->
withInstalled
(
true
)
->
executeOne
();
$engine
=
id
(
new
PhabricatorHomeProfileMenuEngine
())
->
setProfileObject
(
$home_app
)
->
setCustomPHID
(
$viewer
->
getPHID
())
->
setController
(
$this
)
->
setShowContentCrumbs
(
false
);
if
(!
$is_content
)
{
$engine
->
addContentPageClass
(
'phabricator-home'
);
}
return
$engine
->
buildResponse
();
}
}
Event Timeline
Log In to Comment