Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98778975
PassphraseCredentialSecretIDTransaction.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
Thu, Jan 16, 09:40
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Jan 18, 09:40 (2 d)
Engine
blob
Format
Raw Data
Handle
23644463
Attached To
rPH Phabricator
PassphraseCredentialSecretIDTransaction.php
View Options
<?php
final
class
PassphraseCredentialSecretIDTransaction
extends
PassphraseCredentialTransactionType
{
const
TRANSACTIONTYPE
=
'passphrase:secretID'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getSecretID
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$old_id
=
$object
->
getSecretID
();
if
(
$old_id
)
{
$this
->
destroySecret
(
$old_id
);
}
$object
->
setSecretID
(
$value
);
}
public
function
getTitle
()
{
$old
=
$this
->
getOldValue
();
if
(!
$old
)
{
return
pht
(
'%s attached a new secret to this credential.'
,
$this
->
renderAuthor
());
}
else
{
return
pht
(
'%s updated the secret for this credential.'
,
$this
->
renderAuthor
());
}
}
public
function
getTitleForFeed
()
{
$old
=
$this
->
getOldValue
();
if
(
$old
===
null
)
{
return
pht
(
'%s attached a new secret to %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
else
{
return
pht
(
'%s updated the secret for %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
}
public
function
getIcon
()
{
return
'fa-key'
;
}
}
Event Timeline
Log In to Comment