Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96151141
PhabricatorRepositoryIdentityEditEngine.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
Mon, Dec 23, 04:42
Size
2 KB
Mime Type
text/x-php
Expires
Wed, Dec 25, 04:42 (1 d, 19 h)
Engine
blob
Format
Raw Data
Handle
23133759
Attached To
rPH Phabricator
PhabricatorRepositoryIdentityEditEngine.php
View Options
<?php
final
class
PhabricatorRepositoryIdentityEditEngine
extends
PhabricatorEditEngine
{
const
ENGINECONST
=
'repository.identity'
;
public
function
isEngineConfigurable
()
{
return
false
;
}
public
function
getEngineName
()
{
return
pht
(
'Repository Identities'
);
}
public
function
getSummaryHeader
()
{
return
pht
(
'Edit Repository Identity Configurations'
);
}
public
function
getSummaryText
()
{
return
pht
(
'This engine is used to edit Repository identities.'
);
}
public
function
getEngineApplicationClass
()
{
return
'PhabricatorDiffusionApplication'
;
}
protected
function
newEditableObject
()
{
return
new
PhabricatorRepositoryIdentity
();
}
protected
function
newObjectQuery
()
{
return
new
PhabricatorRepositoryIdentityQuery
();
}
protected
function
getObjectCreateTitleText
(
$object
)
{
return
pht
(
'Create Identity'
);
}
protected
function
getObjectCreateButtonText
(
$object
)
{
return
pht
(
'Create Identity'
);
}
protected
function
getObjectEditTitleText
(
$object
)
{
return
pht
(
'Edit Identity: %s'
,
$object
->
getIdentityShortName
());
}
protected
function
getObjectEditShortText
(
$object
)
{
return
pht
(
'Edit Identity'
);
}
protected
function
getObjectCreateShortText
()
{
return
pht
(
'Create Identity'
);
}
protected
function
getObjectName
()
{
return
pht
(
'Identity'
);
}
protected
function
getEditorURI
()
{
return
'/diffusion/identity/edit/'
;
}
protected
function
getObjectCreateCancelURI
(
$object
)
{
return
'/diffusion/identity/'
;
}
protected
function
getObjectViewURI
(
$object
)
{
return
$object
->
getURI
();
}
protected
function
getCreateNewObjectPolicy
()
{
return
PhabricatorPolicies
::
POLICY_USER
;
}
protected
function
buildCustomEditFields
(
$object
)
{
return
array
(
id
(
new
DiffusionIdentityAssigneeEditField
())
->
setKey
(
'manuallySetUserPHID'
)
->
setLabel
(
pht
(
'Assigned To'
))
->
setDescription
(
pht
(
'Override this identity
\'
s assignment.'
))
->
setTransactionType
(
PhabricatorRepositoryIdentityAssignTransaction
::
TRANSACTIONTYPE
)
->
setIsCopyable
(
true
)
->
setIsNullable
(
true
)
->
setSingleValue
(
$object
->
getManuallySetUserPHID
()),
);
}
}
Event Timeline
Log In to Comment