Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93027019
DrydockBlueprintDisableTransaction.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
Mon, Nov 25, 16:01
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Nov 27, 16:01 (2 d)
Engine
blob
Format
Raw Data
Handle
22506518
Attached To
rPH Phabricator
DrydockBlueprintDisableTransaction.php
View Options
<?php
final
class
DrydockBlueprintDisableTransaction
extends
DrydockBlueprintTransactionType
{
const
TRANSACTIONTYPE
=
'drydock:blueprint:disabled'
;
public
function
generateOldValue
(
$object
)
{
return
(
bool
)
$object
->
getIsDisabled
();
}
public
function
generateNewValue
(
$object
,
$value
)
{
return
(
bool
)
$value
;
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setIsDisabled
((
int
)
$value
);
}
public
function
getTitle
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
)
{
return
pht
(
'%s disabled this blueprint.'
,
$this
->
renderAuthor
());
}
else
{
return
pht
(
'%s enabled this blueprint.'
,
$this
->
renderAuthor
());
}
}
public
function
getTitleForFeed
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
)
{
return
pht
(
'%s disabled %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
else
{
return
pht
(
'%s enabled %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
}
}
Event Timeline
Log In to Comment