[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorRepositoryArcanistProjectDeleteController 4 extends PhabricatorRepositoryController { 5 6 private $id; 7 8 public function willProcessRequest(array $data) { 9 $this->id = $data['id']; 10 } 11 12 public function processRequest() { 13 14 $arc_project = 15 id(new PhabricatorRepositoryArcanistProject())->load($this->id); 16 if (!$arc_project) { 17 return new Aphront404Response(); 18 } 19 20 $request = $this->getRequest(); 21 22 if ($request->isDialogFormPost()) { 23 $arc_project->delete(); 24 return id(new AphrontRedirectResponse())->setURI('/repository/'); 25 } 26 27 $dialog = new AphrontDialogView(); 28 $dialog 29 ->setUser($request->getUser()) 30 ->setTitle('Really delete this arcanist project?') 31 ->appendChild(hsprintf( 32 '<p>Really delete the "%s" arcanist project? '. 33 'This operation can not be undone.</p>', 34 $arc_project->getName())) 35 ->setSubmitURI('/repository/project/delete/'.$this->id.'/') 36 ->addSubmitButton('Delete Arcanist Project') 37 ->addCancelButton('/repository/'); 38 39 return id(new AphrontDialogResponse())->setDialog($dialog); 40 } 41 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |