Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F570421
PhabricatorSearchThreeStateField.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
PhabricatorSearchThreeStateField.php
View Options
<?php
final
class
PhabricatorSearchThreeStateField
extends
PhabricatorSearchField
{
private
$options
;
public
function
setOptions
(
$null
,
$yes
,
$no
)
{
$this
->
options
=
array
(
''
=>
$null
,
'true'
=>
$yes
,
'false'
=>
$no
,
);
return
$this
;
}
public
function
getOptions
()
{
return
$this
->
options
;
}
protected
function
getDefaultValue
()
{
return
null
;
}
protected
function
getValueFromRequest
(
AphrontRequest
$request
,
$key
)
{
if
(!
strlen
(
$request
->
getStr
(
$key
)))
{
return
null
;
}
return
$request
->
getBool
(
$key
);
}
protected
function
newControl
()
{
return
id
(
new
AphrontFormSelectControl
())
->
setOptions
(
$this
->
getOptions
());
}
protected
function
getValueForControl
()
{
$value
=
parent
::
getValueForControl
();
if
(
$value
===
true
)
{
return
'true'
;
}
if
(
$value
===
false
)
{
return
'false'
;
}
return
null
;
}
protected
function
newConduitParameterType
()
{
return
new
ConduitBoolParameterType
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 13, 3:28 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
108643
Default Alt Text
PhabricatorSearchThreeStateField.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment