Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2894744
PhabricatorMacroAudioTransaction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorMacroAudioTransaction.php
View Options
<?php
final
class
PhabricatorMacroAudioTransaction
extends
PhabricatorMacroTransactionType
{
const
TRANSACTIONTYPE
=
'macro:audio'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getAudioPHID
(
)
;
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setAudioPHID
(
$value
)
;
}
public
function
extractFilePHIDs
(
$object
,
$value
)
{
$file_phids
=
array
(
)
;
if
(
$value
)
{
$file_phids
[
]
=
$value
;
}
return
$file_phids
;
}
public
function
getTitle
(
)
{
$new
=
$this
->
getNewValue
(
)
;
$old
=
$this
->
getOldValue
(
)
;
if
(
!
$old
)
{
return
pht
(
'%s attached audio: %s.'
,
$this
->
renderAuthor
(
)
,
$this
->
renderHandle
(
$new
)
)
;
}
else
{
return
pht
(
'%s changed the audio for this macro from %s to %s.'
,
$this
->
renderAuthor
(
)
,
$this
->
renderHandle
(
$old
)
,
$this
->
renderHandle
(
$new
)
)
;
}
}
public
function
getTitleForFeed
(
)
{
$new
=
$this
->
getNewValue
(
)
;
$old
=
$this
->
getOldValue
(
)
;
if
(
!
$old
)
{
return
pht
(
'%s attached audio to %s: %s.'
,
$this
->
renderAuthor
(
)
,
$this
->
renderObject
(
)
,
$this
->
renderHandle
(
$new
)
)
;
}
else
{
return
pht
(
'%s changed the audio for %s from %s to %s.'
,
$this
->
renderAuthor
(
)
,
$this
->
renderObject
(
)
,
$this
->
renderHandle
(
$old
)
,
$this
->
renderHandle
(
$new
)
)
;
}
}
public
function
getIcon
(
)
{
return
'fa-music'
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 20:22 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1128412
Default Alt Text
PhabricatorMacroAudioTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment