Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98366317
PhabricatorFavoritesMenuItemController.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
Sun, Jan 12, 12:58
Size
953 B
Mime Type
text/x-php
Expires
Tue, Jan 14, 12:58 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23562084
Attached To
rPH Phabricator
PhabricatorFavoritesMenuItemController.php
View Options
<?php
final
class
PhabricatorFavoritesMenuItemController
extends
PhabricatorFavoritesController
{
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$this
->
getViewer
();
$type
=
$request
->
getURIData
(
'type'
);
$custom_phid
=
null
;
$menu
=
PhabricatorProfileMenuEngine
::
MENU_GLOBAL
;
if
(
$type
==
'personal'
)
{
$custom_phid
=
$viewer
->
getPHID
();
$menu
=
PhabricatorProfileMenuEngine
::
MENU_PERSONAL
;
}
$application
=
'PhabricatorFavoritesApplication'
;
$favorites
=
id
(
new
PhabricatorApplicationQuery
())
->
setViewer
(
$viewer
)
->
withClasses
(
array
(
$application
))
->
withInstalled
(
true
)
->
executeOne
();
$engine
=
id
(
new
PhabricatorFavoritesProfileMenuEngine
())
->
setProfileObject
(
$favorites
)
->
setCustomPHID
(
$custom_phid
)
->
setController
(
$this
)
->
setMenuType
(
$menu
)
->
setShowNavigation
(
false
);
return
$engine
->
buildResponse
();
}
}
Event Timeline
Log In to Comment