[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
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 }
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 |