Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/almanac/editor/AlmanacInterfaceEditor.php
12256 views
1
<?php
2
3
final class AlmanacInterfaceEditor
4
extends AlmanacEditor {
5
6
public function getEditorObjectsDescription() {
7
return pht('Almanac Interface');
8
}
9
10
public function getCreateObjectTitle($author, $object) {
11
return pht('%s created this interface.', $author);
12
}
13
14
public function getCreateObjectTitleForFeed($author, $object) {
15
return pht('%s created %s.', $author, $object);
16
}
17
18
protected function didCatchDuplicateKeyException(
19
PhabricatorLiskDAO $object,
20
array $xactions,
21
Exception $ex) {
22
23
$errors = array();
24
25
$errors[] = new PhabricatorApplicationTransactionValidationError(
26
null,
27
pht('Invalid'),
28
pht(
29
'Interfaces must have a unique combination of network, device, '.
30
'address, and port.'),
31
null);
32
33
throw new PhabricatorApplicationTransactionValidationException($errors);
34
}
35
36
}
37
38