Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18921327
HarbormasterStepDeleteController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
HarbormasterStepDeleteController.php
View Options
<?php
final
class
HarbormasterStepDeleteController
extends
HarbormasterPlanController
{
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$this
->
getViewer
();
$id
=
$request
->
getURIData
(
'id'
);
$step
=
id
(
new
HarbormasterBuildStepQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
array
(
$id
))
->
requireCapabilities
(
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
PhabricatorPolicyCapability
::
CAN_EDIT
,
))
->
executeOne
();
if
(!
$step
)
{
return
new
Aphront404Response
();
}
$plan_id
=
$step
->
getBuildPlan
()->
getID
();
$done_uri
=
$this
->
getApplicationURI
(
'plan/'
.
$plan_id
.
'/'
);
if
(
$request
->
isDialogFormPost
())
{
$step
->
delete
();
return
id
(
new
AphrontRedirectResponse
())->
setURI
(
$done_uri
);
}
return
$this
->
newDialog
()
->
setTitle
(
pht
(
'Really Delete Step?'
))
->
appendParagraph
(
pht
(
"Are you sure you want to delete this step? "
.
"This can't be undone!"
))
->
addCancelButton
(
$done_uri
)
->
addSubmitButton
(
pht
(
'Delete Build Step'
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Nov 11, 2:00 PM (1 d, 21 h)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8245836
Default Alt Text
HarbormasterStepDeleteController.php (1 KB)
Attached To
Mode
rP Phabricator
Attached
Detach File
Event Timeline
Log In to Comment