[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/nuance/controller/ -> NuanceRequestorViewController.php (source)

   1  <?php
   2  
   3  final class NuanceRequestorViewController 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($data['id']);
  17    }
  18  
  19    public function processRequest() {
  20      $request = $this->getRequest();
  21      $user = $request->getUser();
  22  
  23      $requestor_id = $this->getRequestorID();
  24      $requestor = id(new NuanceRequestorQuery())
  25        ->setViewer($user)
  26        ->withIDs(array($requestor_id))
  27        ->executeOne();
  28  
  29      if (!$requestor) {
  30        return new Aphront404Response();
  31      }
  32  
  33      $crumbs = $this->buildApplicationCrumbs();
  34      $title = 'TODO';
  35  
  36      return $this->buildApplicationPage(
  37        $crumbs,
  38        array(
  39          'title' => $title,
  40        ));
  41    }
  42  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1