Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F433700
PholioMockStatusTransaction.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
PholioMockStatusTransaction.php
View Options
<?php
final
class
PholioMockStatusTransaction
extends
PholioMockTransactionType
{
const
TRANSACTIONTYPE
=
'status'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getStatus
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setStatus
(
$value
);
}
public
function
getTitle
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
==
PholioMock
::
STATUS_CLOSED
)
{
return
pht
(
'%s closed this mock.'
,
$this
->
renderAuthor
());
}
else
{
return
pht
(
'%s opened this mock.'
,
$this
->
renderAuthor
());
}
}
public
function
getTitleForFeed
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
==
PholioMock
::
STATUS_CLOSED
)
{
return
pht
(
'%s closed mock %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
else
{
return
pht
(
'%s opened mock %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
}
public
function
getIcon
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
==
PholioMock
::
STATUS_CLOSED
)
{
return
'fa-ban'
;
}
else
{
return
'fa-check'
;
}
}
public
function
getColor
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
==
PholioMock
::
STATUS_CLOSED
)
{
return
PhabricatorTransactions
::
COLOR_INDIGO
;
}
else
{
return
PhabricatorTransactions
::
COLOR_GREEN
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 3, 4:00 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
61989
Default Alt Text
PholioMockStatusTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment