[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class NuanceRequestorEditController extends NuanceController { 4 5 private $requestorID; 6 7 public function setRequestorID($requestor_id) { 8 $this->requestorID = $requestor_id; 9 return $this; 10 } 11 public function getRequestorID() { 12 return $this->requestorID; 13 } 14 15 public function willProcessRequest(array $data) { 16 $this->setRequestorID(idx($data, 'id')); 17 } 18 19 public function processRequest() { 20 $request = $this->getRequest(); 21 $user = $request->getUser(); 22 23 $requestor_id = $this->getRequestorID(); 24 $is_new = !$requestor_id; 25 26 if ($is_new) { 27 $requestor = new NuanceRequestor(); 28 29 } else { 30 $requestor = id(new NuanceRequestorQuery()) 31 ->setViewer($user) 32 ->withIDs(array($requestor_id)) 33 ->executeOne(); 34 } 35 36 if (!$requestor) { 37 return new Aphront404Response(); 38 } 39 40 $crumbs = $this->buildApplicationCrumbs(); 41 $title = 'TODO'; 42 43 return $this->buildApplicationPage( 44 $crumbs, 45 array( 46 'title' => $title, 47 )); 48 } 49 50 }
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 |