Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122603830
PhabricatorApplicationTransactionFeedStory.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
Sun, Jul 20, 23:24
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jul 22, 23:24 (2 d)
Engine
blob
Format
Raw Data
Handle
27505200
Attached To
rPH Phabricator
PhabricatorApplicationTransactionFeedStory.php
View Options
<?php
/**
* @concrete-extensible
*/
class
PhabricatorApplicationTransactionFeedStory
extends
PhabricatorFeedStory
{
public
function
getPrimaryObjectPHID
()
{
return
$this
->
getValue
(
'objectPHID'
);
}
public
function
getRequiredObjectPHIDs
()
{
return
array
(
$this
->
getPrimaryTransactionPHID
(),
);
}
public
function
getRequiredHandlePHIDs
()
{
$phids
=
array
();
$phids
[]
=
array
(
$this
->
getValue
(
'objectPHID'
));
$phids
[]
=
$this
->
getPrimaryTransaction
()->
getRequiredHandlePHIDs
();
return
array_mergev
(
$phids
);
}
protected
function
getPrimaryTransactionPHID
()
{
return
head
(
$this
->
getValue
(
'transactionPHIDs'
));
}
protected
function
getPrimaryTransaction
()
{
return
$this
->
getObject
(
$this
->
getPrimaryTransactionPHID
());
}
public
function
renderView
()
{
$view
=
$this
->
newStoryView
();
$handle
=
$this
->
getHandle
(
$this
->
getPrimaryObjectPHID
());
$view
->
setHref
(
$handle
->
getURI
());
$view
->
setAppIconFromPHID
(
$handle
->
getPHID
());
$xaction_phids
=
$this
->
getValue
(
'transactionPHIDs'
);
$xaction
=
$this
->
getObject
(
head
(
$xaction_phids
));
$xaction
->
setHandles
(
$this
->
getHandles
());
$view
->
setTitle
(
$xaction
->
getTitleForFeed
());
if
(
nonempty
(
$xaction
->
getBodyForFeed
()))
{
$view
->
appendChild
(
$xaction
->
getBodyForFeed
());
}
$view
->
setImage
(
$this
->
getHandle
(
$this
->
getPrimaryTransaction
()->
getAuthorPHID
())->
getImageURI
());
return
$view
;
}
public
function
renderText
()
{
// TODO: This is grotesque; the feed notification handler relies on it.
return
strip_tags
(
hsprintf
(
'%s'
,
$this
->
renderView
()->
render
()));
}
}
Event Timeline
Log In to Comment