Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2892289
PhameBlogStatusTransaction.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
PhameBlogStatusTransaction.php
View Options
<?php
final
class
PhameBlogStatusTransaction
extends
PhameBlogTransactionType
{
const
TRANSACTIONTYPE
=
'phame.blog.status'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getStatus
(
)
;
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setStatus
(
$value
)
;
}
public
function
getTitle
(
)
{
$new
=
$this
->
getNewValue
(
)
;
switch
(
$new
)
{
case
PhameBlog
::
STATUS_ACTIVE
:
return
pht
(
'%s published this blog.'
,
$this
->
renderAuthor
(
)
)
;
case
PhameBlog
::
STATUS_ARCHIVED
:
return
pht
(
'%s archived this blog.'
,
$this
->
renderAuthor
(
)
)
;
}
}
public
function
getTitleForFeed
(
)
{
$new
=
$this
->
getNewValue
(
)
;
switch
(
$new
)
{
case
PhameBlog
::
STATUS_ACTIVE
:
return
pht
(
'%s published the blog %s.'
,
$this
->
renderAuthor
(
)
,
$this
->
renderObject
(
)
)
;
case
PhameBlog
::
STATUS_ARCHIVED
:
return
pht
(
'%s archived the blog %s.'
,
$this
->
renderAuthor
(
)
,
$this
->
renderObject
(
)
)
;
}
}
public
function
getIcon
(
)
{
$new
=
$this
->
getNewValue
(
)
;
if
(
$new
==
PhameBlog
::
STATUS_ARCHIVED
)
{
return
'fa-ban'
;
}
else
{
return
'fa-check'
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 16:35 (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126521
Default Alt Text
PhameBlogStatusTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment