Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93037893
PhabricatorSubscriptionsListController.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
Mon, Nov 25, 17:57
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Nov 27, 17:57 (2 d)
Engine
blob
Format
Raw Data
Handle
22560146
Attached To
rPH Phabricator
PhabricatorSubscriptionsListController.php
View Options
<?php
final
class
PhabricatorSubscriptionsListController
extends
PhabricatorController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$request
->
getUser
();
$object
=
id
(
new
PhabricatorObjectQuery
())
->
setViewer
(
$viewer
)
->
withPHIDs
(
array
(
$request
->
getURIData
(
'phid'
)))
->
executeOne
();
if
(!
$object
)
{
return
new
Aphront404Response
();
}
if
(!(
$object
instanceof
PhabricatorSubscribableInterface
))
{
return
new
Aphront404Response
();
}
$phid
=
$object
->
getPHID
();
$handle_phids
=
PhabricatorSubscribersQuery
::
loadSubscribersForPHID
(
$phid
);
$handle_phids
[]
=
$phid
;
$handles
=
id
(
new
PhabricatorHandleQuery
())
->
setViewer
(
$viewer
)
->
withPHIDs
(
$handle_phids
)
->
execute
();
$object_handle
=
$handles
[
$phid
];
$dialog
=
id
(
new
SubscriptionListDialogBuilder
())
->
setViewer
(
$viewer
)
->
setTitle
(
pht
(
'Subscribers'
))
->
setObjectPHID
(
$phid
)
->
setHandles
(
$handles
)
->
buildDialog
();
return
id
(
new
AphrontDialogResponse
())->
setDialog
(
$dialog
);
}
}
Event Timeline
Log In to Comment