Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F573211
PhabricatorMacroAudioBehaviorTransaction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorMacroAudioBehaviorTransaction.php
View Options
<?php
final
class
PhabricatorMacroAudioBehaviorTransaction
extends
PhabricatorMacroTransactionType
{
const
TRANSACTIONTYPE
=
'macro:audiobehavior'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getAudioBehavior
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setAudioBehavior
(
$value
);
}
public
function
getTitle
()
{
$new
=
$this
->
getNewValue
();
$old
=
$this
->
getOldValue
();
switch
(
$new
)
{
case
PhabricatorFileImageMacro
::
AUDIO_BEHAVIOR_ONCE
:
return
pht
(
'%s set the audio to play once.'
,
$this
->
renderAuthor
());
case
PhabricatorFileImageMacro
::
AUDIO_BEHAVIOR_LOOP
:
return
pht
(
'%s set the audio to loop.'
,
$this
->
renderAuthor
());
default
:
return
pht
(
'%s disabled the audio for this macro.'
,
$this
->
renderAuthor
());
}
}
public
function
getTitleForFeed
()
{
$new
=
$this
->
getNewValue
();
$old
=
$this
->
getOldValue
();
switch
(
$new
)
{
case
PhabricatorFileImageMacro
::
AUDIO_BEHAVIOR_ONCE
:
return
pht
(
'%s set the audio for %s to play once.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
case
PhabricatorFileImageMacro
::
AUDIO_BEHAVIOR_LOOP
:
return
pht
(
'%s set the audio for %s to loop.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
default
:
return
pht
(
'%s disabled the audio for %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
}
public
function
getIcon
()
{
$new
=
$this
->
getNewValue
();
switch
(
$new
)
{
case
PhabricatorFileImageMacro
::
AUDIO_BEHAVIOR_ONCE
:
return
'fa-play-circle'
;
case
PhabricatorFileImageMacro
::
AUDIO_BEHAVIOR_LOOP
:
return
'fa-repeat'
;
default
:
return
'fa-pause-circle'
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 13, 5:45 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
121934
Default Alt Text
PhabricatorMacroAudioBehaviorTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment