[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PholioInlineListController extends PholioController { 4 5 private $id; 6 7 public function willProcessRequest(array $data) { 8 $this->id = $data['id']; 9 } 10 11 public function processRequest() { 12 $request = $this->getRequest(); 13 $user = $request->getUser(); 14 15 $image = id(new PholioImageQuery()) 16 ->setViewer($user) 17 ->withIDs(array($this->id)) 18 ->executeOne(); 19 if (!$image) { 20 return new Aphront404Response(); 21 } 22 23 $inline_comments = id(new PholioTransactionComment())->loadAllWhere( 24 'imageid = %d AND (transactionphid IS NOT NULL 25 OR (authorphid = %s AND transactionphid IS NULL))', 26 $this->id, 27 $user->getPHID()); 28 29 $author_phids = mpull($inline_comments, 'getAuthorPHID'); 30 $authors = $this->loadViewerHandles($author_phids); 31 32 $inlines = array(); 33 foreach ($inline_comments as $inline_comment) { 34 $inlines[] = $inline_comment->toDictionary(); 35 } 36 37 return id(new AphrontAjaxResponse())->setContent($inlines); 38 } 39 40 }
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 |