Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90465170
PhabricatorBoolEditField.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
Fri, Nov 1, 22:33
Size
794 B
Mime Type
text/x-php
Expires
Sun, Nov 3, 22:33 (2 d)
Engine
blob
Format
Raw Data
Handle
22081317
Attached To
rPH Phabricator
PhabricatorBoolEditField.php
View Options
<?php
final
class
PhabricatorBoolEditField
extends
PhabricatorEditField
{
private
$options
;
public
function
setOptions
(
$off_label
,
$on_label
)
{
$this
->
options
=
array
(
'0'
=>
$off_label
,
'1'
=>
$on_label
,
);
return
$this
;
}
public
function
getOptions
()
{
return
$this
->
options
;
}
protected
function
newControl
()
{
$options
=
$this
->
getOptions
();
if
(!
$options
)
{
$options
=
array
(
'0'
=>
pht
(
'False'
),
'1'
=>
pht
(
'True'
),
);
}
return
id
(
new
AphrontFormSelectControl
())
->
setOptions
(
$options
);
}
protected
function
newHTTPParameterType
()
{
return
new
AphrontBoolHTTPParameterType
();
}
protected
function
newConduitParameterType
()
{
return
new
ConduitBoolParameterType
();
}
}
Event Timeline
Log In to Comment