Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93200619
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
Tue, Nov 26, 23:40
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Nov 28, 23:40 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
22592206
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