Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99058230
PhabricatorTokenGivenFeedStory.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
Sat, Jan 18, 19:11
Size
992 B
Mime Type
text/x-php
Expires
Mon, Jan 20, 19:11 (2 d)
Engine
blob
Format
Raw Data
Handle
23698825
Attached To
rPH Phabricator
PhabricatorTokenGivenFeedStory.php
View Options
<?php
final
class
PhabricatorTokenGivenFeedStory
extends
PhabricatorFeedStory
{
public
function
getPrimaryObjectPHID
()
{
return
$this
->
getValue
(
'objectPHID'
);
}
public
function
getRequiredHandlePHIDs
()
{
$phids
=
array
();
$phids
[]
=
$this
->
getValue
(
'objectPHID'
);
$phids
[]
=
$this
->
getValue
(
'authorPHID'
);
return
$phids
;
}
public
function
renderView
()
{
$view
=
new
PhabricatorFeedStoryView
();
$view
->
setViewed
(
$this
->
getHasViewed
());
$href
=
$this
->
getHandle
(
$this
->
getPrimaryObjectPHID
())->
getURI
();
$view
->
setHref
(
$view
);
$title
=
pht
(
'%s awarded %s a token.'
,
$this
->
linkTo
(
$this
->
getValue
(
'authorPHID'
)),
$this
->
linkTo
(
$this
->
getValue
(
'objectPHID'
)));
$view
->
setTitle
(
$title
);
$view
->
setOneLineStory
(
true
);
return
$view
;
}
public
function
renderText
()
{
// TODO: This is grotesque; the feed notification handler relies on it.
return
strip_tags
(
$this
->
renderView
()->
render
());
}
}
Event Timeline
Log In to Comment