Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92676598
DiffusionCommitVerifyTransaction.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
Fri, Nov 22, 16:29
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Nov 24, 16:29 (2 d)
Engine
blob
Format
Raw Data
Handle
22485061
Attached To
rPH Phabricator
DiffusionCommitVerifyTransaction.php
View Options
<?php
final
class
DiffusionCommitVerifyTransaction
extends
DiffusionCommitAuditTransaction
{
const
TRANSACTIONTYPE
=
'diffusion.commit.verify'
;
const
ACTIONKEY
=
'verify'
;
protected
function
getCommitActionLabel
()
{
return
pht
(
'Request Verification'
);
}
protected
function
getCommitActionDescription
()
{
return
pht
(
'Auditors will be asked to verify that concerns have been addressed.'
);
}
protected
function
getCommitActionGroupKey
()
{
return
DiffusionCommitEditEngine
::
ACTIONGROUP_COMMIT
;
}
public
function
getIcon
()
{
return
'fa-refresh'
;
}
public
function
getColor
()
{
return
'indigo'
;
}
protected
function
getCommitActionOrder
()
{
return
600
;
}
public
function
getActionName
()
{
return
pht
(
'Requested Verification'
);
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setAuditStatus
(
PhabricatorAuditCommitStatusConstants
::
NEEDS_VERIFICATION
);
}
protected
function
validateAction
(
$object
,
PhabricatorUser
$viewer
)
{
if
(!
$this
->
isViewerCommitAuthor
(
$object
,
$viewer
))
{
throw
new
Exception
(
pht
(
'You can not request verification of this commit because you '
.
'are not the author.'
));
}
$status
=
$object
->
getAuditStatus
();
if
(
$status
!=
PhabricatorAuditCommitStatusConstants
::
CONCERN_RAISED
)
{
throw
new
Exception
(
pht
(
'You can not request verification of this commit because no '
.
'auditors have raised conerns with it.'
));
}
}
public
function
getTitle
()
{
return
pht
(
'%s requested verification of this commit.'
,
$this
->
renderAuthor
());
}
public
function
getTitleForFeed
()
{
return
pht
(
'%s requested verification of %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
}
Event Timeline
Log In to Comment