Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F85976869
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, Oct 3, 09:50
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Oct 5, 09:50 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
21312451
Attached To
rPH Phabricator
PhabricatorStandardCustomFieldUsers.php
View Options
<?php
final
class
PhabricatorStandardCustomFieldUsers
extends
PhabricatorStandardCustomFieldPHIDs
{
public
function
getFieldType
()
{
return
'users'
;
}
public
function
renderEditControl
()
{
$handles
=
array
();
$value
=
$this
->
getFieldValue
();
if
(
$value
)
{
// TODO: Surface and batch.
$handles
=
id
(
new
PhabricatorHandleQuery
())
->
setViewer
(
$this
->
getViewer
())
->
withPHIDs
(
$value
)
->
execute
();
}
$control
=
id
(
new
AphrontFormTokenizerControl
())
->
setLabel
(
$this
->
getFieldName
())
->
setName
(
$this
->
getFieldKey
())
->
setDatasource
(
'/typeahead/common/accounts/'
)
->
setValue
(
$handles
);
$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
(
'/typeahead/common/accounts/'
)
->
setValue
(
$handles
);
$form
->
appendChild
(
$control
);
}
}
Event Timeline
Log In to Comment