Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93609500
PhabricatorPackagesVersionEditor.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
Sat, Nov 30, 03:30
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Dec 2, 03:30 (2 d)
Engine
blob
Format
Raw Data
Handle
22646079
Attached To
rPH Phabricator
PhabricatorPackagesVersionEditor.php
View Options
<?php
final
class
PhabricatorPackagesVersionEditor
extends
PhabricatorPackagesEditor
{
public
function
getEditorObjectsDescription
()
{
return
pht
(
'Package Versions'
);
}
public
function
getCreateObjectTitle
(
$author
,
$object
)
{
return
pht
(
'%s created this version.'
,
$author
);
}
public
function
getCreateObjectTitleForFeed
(
$author
,
$object
)
{
return
pht
(
'%s created %s.'
,
$author
,
$object
);
}
protected
function
getMailTo
(
PhabricatorLiskDAO
$object
)
{
return
array
();
}
protected
function
didCatchDuplicateKeyException
(
PhabricatorLiskDAO
$object
,
array
$xactions
,
Exception
$ex
)
{
$errors
=
array
();
$errors
[]
=
new
PhabricatorApplicationTransactionValidationError
(
PhabricatorPackagesVersionNameTransaction
::
TRANSACTIONTYPE
,
pht
(
'Duplicate'
),
pht
(
'The version "%s" already exists for this package. Each version '
.
'must have a unique name.'
,
$object
->
getName
()),
null
);
throw
new
PhabricatorApplicationTransactionValidationException
(
$errors
);
}
}
Event Timeline
Log In to Comment