Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92967483
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, Nov 25, 05:39
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Nov 27, 05:39 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22547151
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
(
pht
(
'Really delete this arcanist project?'
))
->
appendChild
(
pht
(
'Really delete the "%s" arcanist project? '
.
'This operation can not be undone.'
,
$arc_project
->
getName
()))
->
setSubmitURI
(
'/repository/project/delete/'
.
$this
->
id
.
'/'
)
->
addSubmitButton
(
pht
(
'Delete Arcanist Project'
))
->
addCancelButton
(
'/repository/'
);
return
id
(
new
AphrontDialogResponse
())->
setDialog
(
$dialog
);
}
}
Event Timeline
Log In to Comment