[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/notification/controller/ -> PhabricatorNotificationIndividualController.php (source)

   1  <?php
   2  
   3  final class PhabricatorNotificationIndividualController
   4    extends PhabricatorNotificationController {
   5  
   6    public function processRequest() {
   7      $request = $this->getRequest();
   8      $user = $request->getUser();
   9  
  10      $stories = id(new PhabricatorNotificationQuery())
  11        ->setViewer($user)
  12        ->withUserPHIDs(array($user->getPHID()))
  13        ->withKeys(array($request->getStr('key')))
  14        ->execute();
  15  
  16      if (!$stories) {
  17        return id(new AphrontAjaxResponse())->setContent(
  18          array(
  19            'pertinent' => false,
  20          ));
  21      }
  22  
  23      $builder = new PhabricatorNotificationBuilder($stories);
  24      $content = $builder->buildView()->render();
  25  
  26      $response = array(
  27        'pertinent'         => true,
  28        'primaryObjectPHID' => head($stories)->getPrimaryObjectPHID(),
  29        'content'           => hsprintf('%s', $content),
  30      );
  31  
  32      return id(new AphrontAjaxResponse())->setContent($response);
  33    }
  34  }


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