Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92654759
PhabricatorProjectStatusTransaction.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 22, 10:42
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Nov 24, 10:42 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22479176
Attached To
rPH Phabricator
PhabricatorProjectStatusTransaction.php
View Options
<?php
final
class
PhabricatorProjectStatusTransaction
extends
PhabricatorProjectTransactionType
{
const
TRANSACTIONTYPE
=
'project:status'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getStatus
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setStatus
(
$value
);
}
public
function
getTitle
()
{
$old
=
$this
->
getOldValue
();
if
(
$old
==
0
)
{
return
pht
(
'%s archived this project.'
,
$this
->
renderAuthor
());
}
else
{
return
pht
(
'%s activated this project.'
,
$this
->
renderAuthor
());
}
}
public
function
getTitleForFeed
()
{
$old
=
$this
->
getOldValue
();
if
(
$old
==
0
)
{
return
pht
(
'%s archived %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
else
{
return
pht
(
'%s activated %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
}
public
function
getColor
()
{
$old
=
$this
->
getOldValue
();
if
(
$old
==
0
)
{
return
'red'
;
}
else
{
return
'green'
;
}
}
public
function
getIcon
()
{
$old
=
$this
->
getOldValue
();
if
(
$old
==
0
)
{
return
'fa-ban'
;
}
else
{
return
'fa-check'
;
}
}
}
Event Timeline
Log In to Comment