Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2896171
PonderAnswerStatusTransaction.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
PonderAnswerStatusTransaction.php
View Options
<?php
final
class
PonderAnswerStatusTransaction
extends
PonderAnswerTransactionType
{
const
TRANSACTIONTYPE
=
'ponder.answer:status'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getStatus
(
)
;
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setStatus
(
$value
)
;
}
public
function
getTitle
(
)
{
$new
=
$this
->
getNewValue
(
)
;
if
(
$new
==
PonderAnswerStatus
::
ANSWER_STATUS_VISIBLE
)
{
return
pht
(
'%s marked this answer as visible.'
,
$this
->
renderAuthor
(
)
)
;
}
else
if
(
$new
==
PonderAnswerStatus
::
ANSWER_STATUS_HIDDEN
)
{
return
pht
(
'%s marked this answer as hidden.'
,
$this
->
renderAuthor
(
)
)
;
}
}
public
function
getTitleForFeed
(
)
{
$new
=
$this
->
getNewValue
(
)
;
if
(
$new
==
PonderAnswerStatus
::
ANSWER_STATUS_VISIBLE
)
{
return
pht
(
'%s marked %s as visible.'
,
$this
->
renderAuthor
(
)
,
$this
->
renderObject
(
)
)
;
}
else
if
(
$new
==
PonderAnswerStatus
::
ANSWER_STATUS_HIDDEN
)
{
return
pht
(
'%s marked %s as hidden.'
,
$this
->
renderAuthor
(
)
,
$this
->
renderObject
(
)
)
;
}
}
public
function
getIcon
(
)
{
$new
=
$this
->
getNewValue
(
)
;
if
(
$new
==
PonderAnswerStatus
::
ANSWER_STATUS_VISIBLE
)
{
return
'fa-ban'
;
}
else
if
(
$new
==
PonderAnswerStatus
::
ANSWER_STATUS_HIDDEN
)
{
return
'fa-check'
;
}
}
public
function
getColor
(
)
{
$new
=
$this
->
getNewValue
(
)
;
if
(
$new
==
PonderAnswerStatus
::
ANSWER_STATUS_VISIBLE
)
{
return
'green'
;
}
else
if
(
$new
==
PonderAnswerStatus
::
ANSWER_STATUS_HIDDEN
)
{
return
'indigo'
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Jan 19 2025, 22:40 (6 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1129491
Default Alt Text
PonderAnswerStatusTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment