Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93585322
PhabricatorPackagesPackageEditor.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, Nov 29, 22:57
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Dec 1, 22:57 (2 d)
Engine
blob
Format
Raw Data
Handle
22667491
Attached To
rPH Phabricator
PhabricatorPackagesPackageEditor.php
View Options
<?php
final
class
PhabricatorPackagesPackageEditor
extends
PhabricatorPackagesEditor
{
public
function
getEditorObjectsDescription
()
{
return
pht
(
'Package Packages'
);
}
public
function
getCreateObjectTitle
(
$author
,
$object
)
{
return
pht
(
'%s created this package.'
,
$author
);
}
public
function
getCreateObjectTitleForFeed
(
$author
,
$object
)
{
return
pht
(
'%s created %s.'
,
$author
,
$object
);
}
public
function
getTransactionTypes
()
{
$types
=
parent
::
getTransactionTypes
();
$types
[]
=
PhabricatorTransactions
::
TYPE_VIEW_POLICY
;
$types
[]
=
PhabricatorTransactions
::
TYPE_EDIT_POLICY
;
return
$types
;
}
protected
function
shouldPublishFeedStory
(
PhabricatorLiskDAO
$object
,
array
$xactions
)
{
return
true
;
}
protected
function
getMailTo
(
PhabricatorLiskDAO
$object
)
{
return
array
();
}
protected
function
didCatchDuplicateKeyException
(
PhabricatorLiskDAO
$object
,
array
$xactions
,
Exception
$ex
)
{
$errors
=
array
();
$errors
[]
=
new
PhabricatorApplicationTransactionValidationError
(
PhabricatorPackagesPackageKeyTransaction
::
TRANSACTIONTYPE
,
pht
(
'Duplicate'
),
pht
(
'The package key "%s" is already in use by another package provided '
.
'by this publisher.'
,
$object
->
getPackageKey
()),
null
);
throw
new
PhabricatorApplicationTransactionValidationException
(
$errors
);
}
}
Event Timeline
Log In to Comment