Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F479977
PhabricatorSearchThreeStateField.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
939 B
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
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, May 7, 9:50 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
78328
Default Alt Text
PhabricatorSearchThreeStateField.php (939 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment