Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91658676
PhabricatorTransactionsDestructionEngineExtension.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
Wed, Nov 13, 04:35
Size
747 B
Mime Type
text/x-php
Expires
Fri, Nov 15, 04:35 (2 d)
Engine
blob
Format
Raw Data
Handle
22302387
Attached To
rPH Phabricator
PhabricatorTransactionsDestructionEngineExtension.php
View Options
<?php
final
class
PhabricatorTransactionsDestructionEngineExtension
extends
PhabricatorDestructionEngineExtension
{
const
EXTENSIONKEY
=
'transactions'
;
public
function
getExtensionName
()
{
return
pht
(
'Transactions'
);
}
public
function
canDestroyObject
(
PhabricatorDestructionEngine
$engine
,
$object
)
{
return
(
$object
instanceof
PhabricatorApplicationTransactionInterface
);
}
public
function
destroyObject
(
PhabricatorDestructionEngine
$engine
,
$object
)
{
$template
=
$object
->
getApplicationTransactionTemplate
();
$xactions
=
$template
->
loadAllWhere
(
'objectPHID = %s'
,
$object
->
getPHID
());
foreach
(
$xactions
as
$xaction
)
{
$engine
->
destroyObject
(
$xaction
);
}
}
}
Event Timeline
Log In to Comment