Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102853061
PhabricatorRepositoryArcanistProjectDeleteController.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, Feb 24, 21:08
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Feb 26, 21:08 (2 d)
Engine
blob
Format
Raw Data
Handle
24429269
Attached To
rPH Phabricator
PhabricatorRepositoryArcanistProjectDeleteController.php
View Options
<?php
final
class
PhabricatorRepositoryArcanistProjectDeleteController
extends
PhabricatorRepositoryController
{
private
$id
;
public
function
willProcessRequest
(
array
$data
)
{
$this
->
id
=
$data
[
'id'
];
}
public
function
processRequest
()
{
$arc_project
=
id
(
new
PhabricatorRepositoryArcanistProject
())->
load
(
$this
->
id
);
if
(!
$arc_project
)
{
return
new
Aphront404Response
();
}
$request
=
$this
->
getRequest
();
if
(
$request
->
isDialogFormPost
())
{
$arc_project
->
delete
();
return
id
(
new
AphrontRedirectResponse
())->
setURI
(
'/repository/'
);
}
$dialog
=
new
AphrontDialogView
();
$dialog
->
setUser
(
$request
->
getUser
())
->
setTitle
(
'Really delete this arcanist project?'
)
->
appendChild
(
hsprintf
(
'<p>Really delete the "%s" arcanist project? '
.
'This operation can not be undone.</p>'
,
$arc_project
->
getName
()))
->
setSubmitURI
(
'/repository/project/delete/'
.
$this
->
id
.
'/'
)
->
addSubmitButton
(
'Delete Arcanist Project'
)
->
addCancelButton
(
'/repository/'
);
return
id
(
new
AphrontDialogResponse
())->
setDialog
(
$dialog
);
}
}
Event Timeline
Log In to Comment