Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F544014
PhabricatorRemarkupEditField.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
PhabricatorRemarkupEditField.php
View Options
<?php
final
class
PhabricatorRemarkupEditField
extends
PhabricatorEditField
{
protected
function
newControl
()
{
return
new
PhabricatorRemarkupControl
();
}
protected
function
newHTTPParameterType
()
{
return
new
AphrontRemarkupHTTPParameterType
();
}
protected
function
newConduitParameterType
()
{
return
new
ConduitStringParameterType
();
}
protected
function
newBulkParameterType
()
{
return
new
BulkRemarkupParameterType
();
}
public
function
getValueForTransaction
()
{
$value
=
$this
->
getValue
();
if
(
$value
instanceof
RemarkupValue
)
{
$value
=
$value
->
getCorpus
();
}
return
$value
;
}
public
function
getValueForDefaults
()
{
$value
=
parent
::
getValueForDefaults
();
if
(
$value
instanceof
RemarkupValue
)
{
$value
=
$value
->
getCorpus
();
}
return
$value
;
}
protected
function
getDefaultValueFromConfiguration
(
$value
)
{
// See T13685. After changes to file attachment handling, the database
// was briefly poisoned with "array()" values as defaults.
try
{
$value
=
phutil_string_cast
(
$value
);
}
catch
(
Exception
$ex
)
{
$value
=
''
;
}
catch
(
Throwable
$ex
)
{
$value
=
''
;
}
return
$value
;
}
public
function
getMetadata
()
{
$defaults
=
array
();
$value
=
$this
->
getValue
();
if
(
$value
instanceof
RemarkupValue
)
{
$defaults
[
'remarkup.control'
]
=
$value
->
getMetadata
();
}
$metadata
=
parent
::
getMetadata
();
$metadata
=
$metadata
+
$defaults
;
return
$metadata
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 11:36 AM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
116557
Default Alt Text
PhabricatorRemarkupEditField.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment