Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F467754
AlmanacNamespaceEditor.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
AlmanacNamespaceEditor.php
View Options
<?php
final
class
AlmanacNamespaceEditor
extends
AlmanacEditor
{
public
function
getEditorObjectsDescription
()
{
return
pht
(
'Almanac Namespace'
);
}
public
function
getCreateObjectTitle
(
$author
,
$object
)
{
return
pht
(
'%s created this namespace.'
,
$author
);
}
public
function
getCreateObjectTitleForFeed
(
$author
,
$object
)
{
return
pht
(
'%s created %s.'
,
$author
,
$object
);
}
protected
function
supportsSearch
()
{
return
true
;
}
public
function
getTransactionTypes
()
{
$types
=
parent
::
getTransactionTypes
();
$types
[]
=
PhabricatorTransactions
::
TYPE_VIEW_POLICY
;
$types
[]
=
PhabricatorTransactions
::
TYPE_EDIT_POLICY
;
return
$types
;
}
protected
function
didCatchDuplicateKeyException
(
PhabricatorLiskDAO
$object
,
array
$xactions
,
Exception
$ex
)
{
$errors
=
array
();
$errors
[]
=
new
PhabricatorApplicationTransactionValidationError
(
null
,
pht
(
'Invalid'
),
pht
(
'Another namespace with this name already exists. Each namespace '
.
'must have a unique name.'
),
null
);
throw
new
PhabricatorApplicationTransactionValidationException
(
$errors
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 6, 3:48 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
80022
Default Alt Text
AlmanacNamespaceEditor.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment