Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81524020
AlmanacPropertiesEditEngineExtension.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, Sep 6, 13:18
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Sep 8, 13:18 (2 d)
Engine
blob
Format
Raw Data
Handle
20588562
Attached To
rPH Phabricator
AlmanacPropertiesEditEngineExtension.php
View Options
<?php
final
class
AlmanacPropertiesEditEngineExtension
extends
PhabricatorEditEngineExtension
{
const
EXTENSIONKEY
=
'almanac.properties'
;
public
function
isExtensionEnabled
()
{
return
true
;
}
public
function
getExtensionName
()
{
return
pht
(
'Almanac Properties'
);
}
public
function
supportsObject
(
PhabricatorEditEngine
$engine
,
PhabricatorApplicationTransactionInterface
$object
)
{
return
(
$object
instanceof
AlmanacPropertyInterface
);
}
public
function
buildCustomEditFields
(
PhabricatorEditEngine
$engine
,
PhabricatorApplicationTransactionInterface
$object
)
{
return
array
(
id
(
new
AlmanacSetPropertyEditField
())
->
setKey
(
'property.set'
)
->
setTransactionType
(
$object
->
getAlmanacPropertySetTransactionType
())
->
setConduitDescription
(
pht
(
'Pass a map of values to set one or more properties.'
))
->
setConduitTypeDescription
(
pht
(
'Map of property names to values.'
))
->
setIsConduitOnly
(
true
),
id
(
new
AlmanacDeletePropertyEditField
())
->
setKey
(
'property.delete'
)
->
setTransactionType
(
$object
->
getAlmanacPropertyDeleteTransactionType
())
->
setConduitDescription
(
pht
(
'Pass a list of property names to delete properties.'
))
->
setConduitTypeDescription
(
pht
(
'List of property names.'
))
->
setIsConduitOnly
(
true
),
);
}
}
Event Timeline
Log In to Comment