Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F107772552
PhabricatorStandardCustomFieldUsers.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
Thu, Apr 10, 14:32
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Apr 12, 14:32 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25475827
Attached To
rPH Phabricator
PhabricatorStandardCustomFieldUsers.php
View Options
<?php
final
class
PhabricatorStandardCustomFieldUsers
extends
PhabricatorStandardCustomFieldPHIDs
{
public
function
getFieldType
()
{
return
'users'
;
}
public
function
renderEditControl
(
array
$handles
)
{
$value
=
$this
->
getFieldValue
();
if
(
$value
)
{
$control_value
=
array_select_keys
(
$handles
,
$value
);
}
else
{
$control_value
=
array
();
}
$control
=
id
(
new
AphrontFormTokenizerControl
())
->
setLabel
(
$this
->
getFieldName
())
->
setName
(
$this
->
getFieldKey
())
->
setDatasource
(
new
PhabricatorPeopleDatasource
())
->
setCaption
(
$this
->
getCaption
())
->
setValue
(
$control_value
);
$limit
=
$this
->
getFieldConfigValue
(
'limit'
);
if
(
$limit
)
{
$control
->
setLimit
(
$limit
);
}
return
$control
;
}
public
function
appendToApplicationSearchForm
(
PhabricatorApplicationSearchEngine
$engine
,
AphrontFormView
$form
,
$value
,
array
$handles
)
{
$control
=
id
(
new
AphrontFormTokenizerControl
())
->
setLabel
(
$this
->
getFieldName
())
->
setName
(
$this
->
getFieldKey
())
->
setDatasource
(
new
PhabricatorPeopleDatasource
())
->
setValue
(
$handles
);
$form
->
appendChild
(
$control
);
}
public
function
getHeraldFieldValueType
(
$condition
)
{
return
HeraldAdapter
::
VALUE_USER
;
}
}
Event Timeline
Log In to Comment