Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121986307
PhabricatorSpacesNamespaceArchiveTransaction.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
Tue, Jul 15, 05:10
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Jul 17, 05:10 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27421254
Attached To
rPH Phabricator
PhabricatorSpacesNamespaceArchiveTransaction.php
View Options
<?php
final
class
PhabricatorSpacesNamespaceArchiveTransaction
extends
PhabricatorSpacesNamespaceTransactionType
{
const
TRANSACTIONTYPE
=
'spaces:archive'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getIsArchived
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setIsArchived
((
int
)
$value
);
}
public
function
getTitle
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
)
{
return
pht
(
'%s archived this space.'
,
$this
->
renderAuthor
());
}
else
{
return
pht
(
'%s activated this space.'
,
$this
->
renderAuthor
());
}
}
public
function
getTitleForFeed
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
)
{
return
pht
(
'%s archived space %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
else
{
return
pht
(
'%s activated space %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
}
public
function
getIcon
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
)
{
return
'fa-ban'
;
}
else
{
return
'fa-check'
;
}
}
public
function
getColor
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
)
{
return
'indigo'
;
}
}
}
Event Timeline
Log In to Comment