[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorFeedStoryDifferentialAggregate 4 extends PhabricatorFeedStoryAggregate { 5 6 public function renderView() { 7 $data = $this->getStoryData(); 8 9 $task_link = $this->linkTo($data->getValue('revision_phid')); 10 11 $authors = $this->getAuthorPHIDs(); 12 13 // TODO: These aren't really translatable because linkTo() returns a 14 // string, not an object with a gender. 15 16 switch (count($authors)) { 17 case 1: 18 $author = $this->linkTo(array_shift($authors)); 19 $title = pht( 20 '%s made multiple updates to %s', 21 $author, 22 $task_link); 23 break; 24 case 2: 25 $author1 = $this->linkTo(array_shift($authors)); 26 $author2 = $this->linkTo(array_shift($authors)); 27 $title = pht( 28 '%s and %s made multiple updates to %s', 29 $author1, 30 $author2, 31 $task_link); 32 break; 33 case 3: 34 $author1 = $this->linkTo(array_shift($authors)); 35 $author2 = $this->linkTo(array_shift($authors)); 36 $author3 = $this->linkTo(array_shift($authors)); 37 $title = pht( 38 '%s, %s, and %s made multiple updates to %s', 39 $author1, 40 $author2, 41 $author3, 42 $task_link); 43 break; 44 default: 45 $author1 = $this->linkTo(array_shift($authors)); 46 $author2 = $this->linkTo(array_shift($authors)); 47 $others = count($authors); 48 $title = pht( 49 '%s, %s, and %d others made multiple updates to %s', 50 $author1, 51 $author2, 52 $others, 53 $task_link); 54 break; 55 } 56 57 $view = $this->newStoryView(); 58 $view->setAppIcon('differential-dark'); 59 $view->setTitle($title); 60 61 $href = $this->getHandle($data->getValue('revision_phid'))->getURI(); 62 $view->setHref($href); 63 64 return $view; 65 } 66 67 }
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 |