Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106289937
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
Mon, Mar 24, 12:19
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Mar 26, 12:19 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25143428
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