Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F455418
PhabricatorStandardCustomFieldText.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
PhabricatorStandardCustomFieldText.php
View Options
<?php
final
class
PhabricatorStandardCustomFieldText
extends
PhabricatorStandardCustomField
{
public
function
getFieldType
()
{
return
'text'
;
}
public
function
buildFieldIndexes
()
{
$indexes
=
array
();
$value
=
$this
->
getFieldValue
();
if
(
strlen
(
$value
))
{
$indexes
[]
=
$this
->
newStringIndex
(
$value
);
}
return
$indexes
;
}
public
function
readApplicationSearchValueFromRequest
(
PhabricatorApplicationSearchEngine
$engine
,
AphrontRequest
$request
)
{
return
$request
->
getStr
(
$this
->
getFieldKey
());
}
public
function
applyApplicationSearchConstraintToQuery
(
PhabricatorApplicationSearchEngine
$engine
,
PhabricatorCursorPagedPolicyAwareQuery
$query
,
$value
)
{
if
(
strlen
(
$value
))
{
$query
->
withApplicationSearchContainsConstraint
(
$this
->
newStringIndex
(
null
),
$value
);
}
}
public
function
appendToApplicationSearchForm
(
PhabricatorApplicationSearchEngine
$engine
,
AphrontFormView
$form
,
$value
,
array
$handles
)
{
$form
->
appendChild
(
id
(
new
AphrontFormTextControl
())
->
setLabel
(
$this
->
getFieldName
())
->
setName
(
$this
->
getFieldKey
())
->
setValue
(
$value
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 5, 6:59 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
70450
Default Alt Text
PhabricatorStandardCustomFieldText.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment