Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97794572
PhluxTransaction.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
Mon, Jan 6, 11:21
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Jan 8, 11:21 (2 d)
Engine
blob
Format
Raw Data
Handle
23452098
Attached To
rPH Phabricator
PhluxTransaction.php
View Options
<?php
final
class
PhluxTransaction
extends
PhabricatorApplicationTransaction
{
const
TYPE_EDIT_KEY
=
'phlux:key'
;
const
TYPE_EDIT_VALUE
=
'phlux:value'
;
public
function
getApplicationName
()
{
return
'phlux'
;
}
public
function
getApplicationTransactionType
()
{
return
PhluxPHIDTypeVariable
::
TYPECONST
;
}
public
function
getApplicationTransactionCommentObject
()
{
return
null
;
}
public
function
getTitle
()
{
$author_phid
=
$this
->
getAuthorPHID
();
switch
(
$this
->
getTransactionType
())
{
case
self
::
TYPE_EDIT_KEY
:
return
pht
(
'%s created this variable.'
,
$this
->
renderHandleLink
(
$author_phid
));
case
self
::
TYPE_EDIT_VALUE
:
return
pht
(
'%s updated this variable.'
,
$this
->
renderHandleLink
(
$author_phid
));
}
return
parent
::
getTitle
();
}
public
function
hasChangeDetails
()
{
switch
(
$this
->
getTransactionType
())
{
case
self
::
TYPE_EDIT_VALUE
:
return
true
;
}
return
parent
::
hasChangeDetails
();
}
public
function
renderChangeDetails
(
PhabricatorUser
$viewer
)
{
return
$this
->
renderTextCorpusChangeDetails
(
$viewer
,
json_encode
(
$this
->
getOldValue
()),
json_encode
(
$this
->
getNewValue
()));
}
}
Event Timeline
Log In to Comment