Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110949955
DrydockBlueprintCoreCustomField.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
Mon, Apr 28, 22:26
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Apr 30, 22:26 (2 d)
Engine
blob
Format
Raw Data
Handle
25845415
Attached To
rPH Phabricator
DrydockBlueprintCoreCustomField.php
View Options
<?php
final
class
DrydockBlueprintCoreCustomField
extends
DrydockBlueprintCustomField
implements
PhabricatorStandardCustomFieldInterface
{
public
function
getStandardCustomFieldNamespace
()
{
return
'drydock:core'
;
}
public
function
createFields
(
$object
)
{
// If this is a generic object without an attached implementation (for
// example, via ApplicationSearch), just don't build any custom fields.
if
(!
$object
->
hasImplementation
())
{
return
array
();
}
$impl
=
$object
->
getImplementation
();
$specs
=
$impl
->
getFieldSpecifications
();
return
PhabricatorStandardCustomField
::
buildStandardFields
(
$this
,
$specs
);
}
public
function
shouldUseStorage
()
{
return
false
;
}
public
function
readValueFromObject
(
PhabricatorCustomFieldInterface
$object
)
{
$key
=
$this
->
getProxy
()->
getRawStandardFieldKey
();
$this
->
setValueFromStorage
(
$object
->
getDetail
(
$key
));
}
public
function
applyApplicationTransactionInternalEffects
(
PhabricatorApplicationTransaction
$xaction
)
{
$object
=
$this
->
getObject
();
$key
=
$this
->
getProxy
()->
getRawStandardFieldKey
();
$this
->
setValueFromApplicationTransactions
(
$xaction
->
getNewValue
());
$value
=
$this
->
getValueForStorage
();
$object
->
setDetail
(
$key
,
$value
);
}
public
function
applyApplicationTransactionExternalEffects
(
PhabricatorApplicationTransaction
$xaction
)
{
return
;
}
public
function
getBlueprintFieldValue
()
{
return
$this
->
getProxy
()->
getFieldValue
();
}
}
Event Timeline
Log In to Comment