Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F72944347
PhabricatorFeedStoryManiphestAggregate.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jul 17, 17:57
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Jul 19, 17:57 (2 d)
Engine
blob
Format
Raw Data
Handle
18946454
Attached To
rPH Phabricator
PhabricatorFeedStoryManiphestAggregate.php
View Options
<?php
final
class
PhabricatorFeedStoryManiphestAggregate
extends
PhabricatorFeedStoryAggregate
{
public
function
renderView
()
{
$data
=
$this
->
getStoryData
();
$task_link
=
$this
->
linkTo
(
$data
->
getValue
(
'taskPHID'
));
$authors
=
$this
->
getAuthorPHIDs
();
// TODO: These aren't really translatable because linkTo() returns a
// string, not an object with a gender.
switch
(
count
(
$authors
))
{
case
1
:
$author
=
$this
->
linkTo
(
array_shift
(
$authors
));
$title
=
pht
(
'%s made multiple updates to %s'
,
$author
,
$task_link
);
break
;
case
2
:
$author1
=
$this
->
linkTo
(
array_shift
(
$authors
));
$author2
=
$this
->
linkTo
(
array_shift
(
$authors
));
$title
=
pht
(
'%s and %s made multiple updates to %s'
,
$author1
,
$author2
,
$task_link
);
break
;
case
3
:
$author1
=
$this
->
linkTo
(
array_shift
(
$authors
));
$author2
=
$this
->
linkTo
(
array_shift
(
$authors
));
$author3
=
$this
->
linkTo
(
array_shift
(
$authors
));
$title
=
pht
(
'%s, %s, and %s made multiple updates to %s'
,
$author1
,
$author2
,
$author3
,
$task_link
);
break
;
default
:
$author1
=
$this
->
linkTo
(
array_shift
(
$authors
));
$author2
=
$this
->
linkTo
(
array_shift
(
$authors
));
$others
=
count
(
$authors
);
$title
=
pht
(
'%s, %s, and %d others made multiple updates to %s'
,
$author1
,
$author2
,
$others
,
$task_link
);
break
;
}
$view
=
$this
->
newStoryView
();
$view
->
setAppIcon
(
'maniphest-dark'
);
$view
->
setTitle
(
$title
);
$href
=
$this
->
getHandle
(
$data
->
getValue
(
'taskPHID'
))->
getURI
();
$view
->
setHref
(
$href
);
return
$view
;
}
}
Event Timeline
Log In to Comment