Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98503244
PhabricatorStandardCustomFieldTokenizer.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
Mon, Jan 13, 19:12
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Jan 15, 19:12 (2 d)
Engine
blob
Format
Raw Data
Handle
23589093
Attached To
rPH Phabricator
PhabricatorStandardCustomFieldTokenizer.php
View Options
<?php
abstract
class
PhabricatorStandardCustomFieldTokenizer
extends
PhabricatorStandardCustomFieldPHIDs
{
abstract
public
function
getDatasource
();
public
function
renderEditControl
(
array
$handles
)
{
$value
=
$this
->
getFieldValue
();
$control
=
id
(
new
AphrontFormTokenizerControl
())
->
setUser
(
$this
->
getViewer
())
->
setLabel
(
$this
->
getFieldName
())
->
setName
(
$this
->
getFieldKey
())
->
setDatasource
(
$this
->
getDatasource
())
->
setCaption
(
$this
->
getCaption
())
->
setValue
(
nonempty
(
$value
,
array
()));
$limit
=
$this
->
getFieldConfigValue
(
'limit'
);
if
(
$limit
)
{
$control
->
setLimit
(
$limit
);
}
return
$control
;
}
public
function
appendToApplicationSearchForm
(
PhabricatorApplicationSearchEngine
$engine
,
AphrontFormView
$form
,
$value
)
{
$control
=
id
(
new
AphrontFormTokenizerControl
())
->
setLabel
(
$this
->
getFieldName
())
->
setName
(
$this
->
getFieldKey
())
->
setDatasource
(
$this
->
getDatasource
())
->
setValue
(
nonempty
(
$value
,
array
()));
$form
->
appendControl
(
$control
);
}
public
function
getHeraldFieldValueType
(
$condition
)
{
return
id
(
new
HeraldTokenizerFieldValue
())
->
setKey
(
'custom.'
.
$this
->
getFieldKey
())
->
setDatasource
(
$this
->
getDatasource
());
}
}
Event Timeline
Log In to Comment