3 final class PhabricatorRepositoryIdentityEditEngine
4 extends PhabricatorEditEngine
{
6 const ENGINECONST
= 'repository.identity';
8 public function isEngineConfigurable() {
12 public function getEngineName() {
13 return pht('Repository Identities');
16 public function getSummaryHeader() {
17 return pht('Edit Repository Identity Configurations');
20 public function getSummaryText() {
21 return pht('This engine is used to edit Repository identities.');
24 public function getEngineApplicationClass() {
25 return 'PhabricatorDiffusionApplication';
28 protected function newEditableObject() {
29 return new PhabricatorRepositoryIdentity();
32 protected function newObjectQuery() {
33 return new PhabricatorRepositoryIdentityQuery();
36 protected function getObjectCreateTitleText($object) {
37 return pht('Create Identity');
40 protected function getObjectCreateButtonText($object) {
41 return pht('Create Identity');
44 protected function getObjectEditTitleText($object) {
45 return pht('Edit Identity: %s', $object->getIdentityShortName());
48 protected function getObjectEditShortText($object) {
49 return pht('Edit Identity');
52 protected function getObjectCreateShortText() {
53 return pht('Create Identity');
56 protected function getObjectName() {
57 return pht('Identity');
60 protected function getEditorURI() {
61 return '/diffusion/identity/edit/';
64 protected function getObjectCreateCancelURI($object) {
65 return '/diffusion/identity/';
68 protected function getObjectViewURI($object) {
69 return $object->getURI();
72 protected function getCreateNewObjectPolicy() {
73 return PhabricatorPolicies
::POLICY_USER
;
76 protected function buildCustomEditFields($object) {
78 id(new DiffusionIdentityAssigneeEditField())
79 ->setKey('manuallySetUserPHID')
80 ->setLabel(pht('Assigned To'))
81 ->setDescription(pht('Override this identity\'s assignment.'))
83 PhabricatorRepositoryIdentityAssignTransaction
::TRANSACTIONTYPE
)
86 ->setSingleValue($object->getManuallySetUserPHID()),