Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F69800957
DifferentialSubscribersField.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
Wed, Jul 3, 14:09
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Jul 5, 14:09 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18757085
Attached To
rPH Phabricator
DifferentialSubscribersField.php
View Options
<?php
final
class
DifferentialSubscribersField
extends
DifferentialCoreCustomField
{
public
function
getFieldKey
()
{
return
'differential:subscribers'
;
}
public
function
getFieldName
()
{
return
pht
(
'Subscribers'
);
}
public
function
getFieldDescription
()
{
return
pht
(
'Manage subscribers.'
);
}
protected
function
readValueFromRevision
(
DifferentialRevision
$revision
)
{
return
PhabricatorSubscribersQuery
::
loadSubscribersForPHID
(
$revision
->
getPHID
());
}
public
function
getNewValueForApplicationTransactions
()
{
return
array
(
'='
=>
$this
->
getValue
());
}
public
function
readValueFromRequest
(
AphrontRequest
$request
)
{
$this
->
setValue
(
$request
->
getArr
(
$this
->
getFieldKey
()));
}
public
function
getRequiredHandlePHIDsForEdit
()
{
return
$this
->
getValue
();
}
public
function
renderEditControl
(
array
$handles
)
{
return
id
(
new
AphrontFormTokenizerControl
())
->
setName
(
$this
->
getFieldKey
())
->
setDatasource
(
'/typeahead/common/mailable/'
)
->
setValue
(
$handles
)
->
setError
(
$this
->
getFieldError
())
->
setLabel
(
$this
->
getFieldName
());
}
public
function
getApplicationTransactionType
()
{
return
PhabricatorTransactions
::
TYPE_SUBSCRIBERS
;
}
}
Event Timeline
Log In to Comment