Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93621640
PhabricatorSubscriptionsCurtainExtension.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
Sat, Nov 30, 05:33
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Dec 2, 05:33 (2 d)
Engine
blob
Format
Raw Data
Handle
22674951
Attached To
rPH Phabricator
PhabricatorSubscriptionsCurtainExtension.php
View Options
<?php
final
class
PhabricatorSubscriptionsCurtainExtension
extends
PHUICurtainExtension
{
const
EXTENSIONKEY
=
'subscriptions.subscribers'
;
public
function
shouldEnableForObject
(
$object
)
{
return
(
$object
instanceof
PhabricatorSubscribableInterface
);
}
public
function
getExtensionApplication
()
{
return
new
PhabricatorSubscriptionsApplication
();
}
public
function
buildCurtainPanel
(
$object
)
{
$viewer
=
$this
->
getViewer
();
$object_phid
=
$object
->
getPHID
();
$subscriber_phids
=
PhabricatorSubscribersQuery
::
loadSubscribersForPHID
(
$object_phid
);
$handles
=
$viewer
->
loadHandles
(
$subscriber_phids
);
// TODO: This class can't accept a HandleList yet.
$handles
=
iterator_to_array
(
$handles
);
$susbscribers_view
=
id
(
new
SubscriptionListStringBuilder
())
->
setObjectPHID
(
$object_phid
)
->
setHandles
(
$handles
)
->
buildPropertyString
();
return
$this
->
newPanel
()
->
setHeaderText
(
pht
(
'Subscribers'
))
->
setOrder
(
20000
)
->
appendChild
(
$susbscribers_view
);
}
}
Event Timeline
Log In to Comment