Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96586654
PhabricatorPackagesPublisherEditor.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, Dec 28, 14:28
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Dec 30, 14:28 (2 d)
Engine
blob
Format
Raw Data
Handle
23212669
Attached To
rPH Phabricator
PhabricatorPackagesPublisherEditor.php
View Options
<?php
final
class
PhabricatorPackagesPublisherEditor
extends
PhabricatorPackagesEditor
{
public
function
getEditorObjectsDescription
()
{
return
pht
(
'Package Publishers'
);
}
public
function
getCreateObjectTitle
(
$author
,
$object
)
{
return
pht
(
'%s created this publisher.'
,
$author
);
}
public
function
getCreateObjectTitleForFeed
(
$author
,
$object
)
{
return
pht
(
'%s created %s.'
,
$author
,
$object
);
}
public
function
getTransactionTypes
()
{
$types
=
parent
::
getTransactionTypes
();
$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
(
PhabricatorPackagesPublisherKeyTransaction
::
TRANSACTIONTYPE
,
pht
(
'Duplicate'
),
pht
(
'The publisher key "%s" is already in use by another publisher.'
,
$object
->
getPublisherKey
()),
null
);
throw
new
PhabricatorApplicationTransactionValidationException
(
$errors
);
}
}
Event Timeline
Log In to Comment