Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93541595
FundInitiativeStatusTransaction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 29, 14:18
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Dec 1, 14:18 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22654112
Attached To
rPH Phabricator
FundInitiativeStatusTransaction.php
View Options
<?php
final
class
FundInitiativeStatusTransaction
extends
FundInitiativeTransactionType
{
const
TRANSACTIONTYPE
=
'fund:status'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getStatus
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setStatus
(
$value
);
}
public
function
getTitle
()
{
if
(
$this
->
getNewValue
()
==
FundInitiative
::
STATUS_CLOSED
)
{
return
pht
(
'%s closed this initiative.'
,
$this
->
renderAuthor
());
}
else
{
return
pht
(
'%s reopened this initiative.'
,
$this
->
renderAuthor
());
}
}
public
function
getTitleForFeed
()
{
if
(
$this
->
getNewValue
()
==
FundInitiative
::
STATUS_CLOSED
)
{
return
pht
(
'%s closed %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
else
{
return
pht
(
'%s reopened %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
}
public
function
getIcon
()
{
if
(
$this
->
getNewValue
()
==
FundInitiative
::
STATUS_CLOSED
)
{
return
'fa-ban'
;
}
else
{
return
'fa-check'
;
}
}
}
Event Timeline
Log In to Comment