Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F490651
DrydockRepositoryOperationDismissController.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
DrydockRepositoryOperationDismissController.php
View Options
<?php
final
class
DrydockRepositoryOperationDismissController
extends
DrydockRepositoryOperationController
{
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$request
->
getViewer
();
$id
=
$request
->
getURIData
(
'id'
);
$operation
=
id
(
new
DrydockRepositoryOperationQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
array
(
$id
))
->
requireCapabilities
(
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
PhabricatorPolicyCapability
::
CAN_EDIT
,
))
->
executeOne
();
if
(!
$operation
)
{
return
new
Aphront404Response
();
}
$object_phid
=
$operation
->
getObjectPHID
();
$handles
=
$viewer
->
loadHandles
(
array
(
$object_phid
));
$done_uri
=
$handles
[
$object_phid
]->
getURI
();
if
(
$operation
->
getIsDismissed
())
{
return
$this
->
newDialog
()
->
setTitle
(
pht
(
'Already Dismissed'
))
->
appendParagraph
(
pht
(
'This operation has already been dismissed, and can not be '
.
'dismissed any further.'
))
->
addCancelButton
(
$done_uri
);
}
if
(
$request
->
isFormPost
())
{
$operation
->
setIsDismissed
(
1
)
->
save
();
return
id
(
new
AphrontRedirectResponse
())->
setURI
(
$done_uri
);
}
return
$this
->
newDialog
()
->
setTitle
(
pht
(
'Dismiss Operation'
))
->
appendParagraph
(
pht
(
'Dismiss this operation? It will no longer be shown, but logs '
.
'can be found in Drydock.'
))
->
addSubmitButton
(
pht
(
'Dismiss'
))
->
addCancelButton
(
$done_uri
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, May 7, 8:55 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
81703
Default Alt Text
DrydockRepositoryOperationDismissController.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment