Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F36276475
PhabricatorFeedStoryAudit.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
PhabricatorFeedStoryAudit.php
View Options
<?php
final
class
PhabricatorFeedStoryAudit
extends
PhabricatorFeedStory
{
public
function
getPrimaryObjectPHID
()
{
return
$this
->
getStoryData
()->
getValue
(
'commitPHID'
);
}
public
function
renderView
()
{
$author_phid
=
$this
->
getAuthorPHID
();
$commit_phid
=
$this
->
getPrimaryObjectPHID
();
$view
=
$this
->
newStoryView
();
$action
=
$this
->
getValue
(
'action'
);
$verb
=
PhabricatorAuditActionConstants
::
getActionPastTenseVerb
(
$action
);
$view
->
setTitle
(
hsprintf
(
'%s %s commit %s.'
,
$this
->
linkTo
(
$author_phid
),
$verb
,
$this
->
linkTo
(
$commit_phid
)));
$comments
=
$this
->
getValue
(
'content'
);
$view
->
setImage
(
$this
->
getHandle
(
$author_phid
)->
getImageURI
());
if
(
$comments
)
{
$content
=
$this
->
renderSummary
(
$this
->
getValue
(
'content'
));
$view
->
appendChild
(
$content
);
}
return
$view
;
}
public
function
renderText
()
{
$author_name
=
$this
->
getHandle
(
$this
->
getAuthorPHID
())->
getLinkName
();
$commit_path
=
$this
->
getHandle
(
$this
->
getPrimaryObjectPHID
())->
getURI
();
$commit_uri
=
PhabricatorEnv
::
getURI
(
$commit_path
);
$action
=
$this
->
getValue
(
'action'
);
$verb
=
PhabricatorAuditActionConstants
::
getActionPastTenseVerb
(
$action
);
$text
=
"{$author_name} {$verb} commit {$commit_uri}"
;
return
$text
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Feb 22, 6:45 PM (1 d, 18 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
84/e7/6fabf88de71c8bbd8b1c867fec41
Attached To
rPHAB Phabricator
Event Timeline
Log In to Comment