Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92210583
PassphraseCredentialDestroyTransaction.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 18, 08:36
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Nov 20, 08:36 (2 d)
Engine
blob
Format
Raw Data
Handle
22395154
Attached To
rPH Phabricator
PassphraseCredentialDestroyTransaction.php
View Options
<?php
final
class
PassphraseCredentialDestroyTransaction
extends
PassphraseCredentialTransactionType
{
const
TRANSACTIONTYPE
=
'passphrase:destroy'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getIsDestroyed
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$is_destroyed
=
$value
;
$object
->
setIsDestroyed
(
$is_destroyed
);
if
(
$is_destroyed
)
{
$secret_id
=
$object
->
getSecretID
();
if
(
$secret_id
)
{
$this
->
destroySecret
(
$secret_id
);
$object
->
setSecretID
(
null
);
}
}
}
public
function
shouldHide
()
{
$new
=
$this
->
getNewValue
();
if
(!
$new
)
{
return
true
;
}
}
public
function
getTitle
()
{
return
pht
(
'%s destroyed the secret for this credential.'
,
$this
->
renderAuthor
());
}
public
function
getTitleForFeed
()
{
return
pht
(
'%s destroyed the secret for credential %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
public
function
getIcon
()
{
return
'fa-ban'
;
}
public
function
getColor
()
{
return
'red'
;
}
}
Event Timeline
Log In to Comment