Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F443818
PhabricatorStandardCustomFieldUsers.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
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/'
)
->
setCaption
(
$this
->
getCaption
())
->
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
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 4, 11:08 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
64863
Default Alt Text
PhabricatorStandardCustomFieldUsers.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment