Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101067037
PhabricatorOptionExportField.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
Wed, Feb 5, 09:54
Size
865 B
Mime Type
text/x-php
Expires
Fri, Feb 7, 09:54 (2 d)
Engine
blob
Format
Raw Data
Handle
24085427
Attached To
rPH Phabricator
PhabricatorOptionExportField.php
View Options
<?php
final
class
PhabricatorOptionExportField
extends
PhabricatorExportField
{
private
$options
;
public
function
setOptions
(
array
$options
)
{
$this
->
options
=
$options
;
return
$this
;
}
public
function
getOptions
()
{
return
$this
->
options
;
}
public
function
getNaturalValue
(
$value
)
{
if
(
$value
===
null
)
{
return
$value
;
}
if
(!
strlen
(
$value
))
{
return
null
;
}
$options
=
$this
->
getOptions
();
return
array
(
'value'
=>
(
string
)
$value
,
'name'
=>
(
string
)
idx
(
$options
,
$value
,
$value
),
);
}
public
function
getTextValue
(
$value
)
{
$natural_value
=
$this
->
getNaturalValue
(
$value
);
if
(
$natural_value
===
null
)
{
return
null
;
}
return
$natural_value
[
'name'
];
}
public
function
getPHPExcelValue
(
$value
)
{
return
$this
->
getTextValue
(
$value
);
}
}
Event Timeline
Log In to Comment