Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1112713
Edit Engine Extension
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
yelirekim
Feb 15 2016, 3:50 PM
2016-02-15 15:50:52 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
Edit Engine Extension
View Options
<?php
final
class
CIEnforcementEngineExtension
extends
PhabricatorEditEngineExtension
{
const
EXTENSIONKEY
=
'enforcement.owners'
;
public
function
isExtensionEnabled
()
{
return
true
;
}
public
function
getExtensionName
()
{
return
pht
(
'Enforcement Policies'
);
}
public
function
supportsObject
(
PhabricatorEditEngine
$engine
,
PhabricatorApplicationTransactionInterface
$object
)
{
return
$engine
instanceof
PhabricatorOwnersPackageEditEngine
&&
$object
instanceof
PhabricatorOwnersPackage
;
}
public
function
buildCustomEditFields
(
PhabricatorEditEngine
$engine
,
PhabricatorApplicationTransactionInterface
$object
)
{
return
[
id
(
new
PhabricatorDatasourceEditField
())
->
setKey
(
'owners'
)
->
setLabel
(
pht
(
'Enforced Owners'
))
->
setDescription
(
pht
(
'Users and projects which own the package.'
))
->
setIsLocked
(
true
)
->
setTransactionType
(
PhabricatorOwnersPackageTransaction
::
TYPE_OWNERS
)
->
setDatasource
(
new
PhabricatorProjectOrUserDatasource
())
->
setIsCopyable
(
true
)
->
setValue
(
$object
->
getOwnerPHIDs
()),
];
}
}
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
52625
Default Alt Text
Edit Engine Extension (1 KB)
Attached To
Mode
P1943 Edit Engine Extension
Attached
Detach File
Event Timeline
Log In to Comment