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