3
final class PhabricatorOwnersDeleteController
4
extends PhabricatorOwnersController {
8
public function willProcessRequest(array $data) {
9
$this->id = $data['id'];
12
public function processRequest() {
13
$request = $this->getRequest();
14
$user = $request->getUser();
16
$package = id(new PhabricatorOwnersPackage())->load($this->id);
18
return new Aphront404Response();
21
if ($request->isDialogFormPost()) {
22
id(new PhabricatorOwnersPackageEditor())
24
->setPackage($package)
26
return id(new AphrontRedirectResponse())->setURI('/owners/');
30
'Are you sure you want to delete the "%s" package? This '.
31
'operation can not be undone.',
33
$dialog = id(new AphrontDialogView())
35
->setTitle(pht('Really delete this package?'))
36
->appendChild(phutil_tag('p', array(), $text))
37
->addSubmitButton(pht('Delete'))
38
->addCancelButton('/owners/package/'.$package->getID().'/')
39
->setSubmitURI($request->getRequestURI());
41
return id(new AphrontDialogResponse())->setDialog($dialog);