Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93206917
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 27, 00:45
Size
747 B
Mime Type
text/x-php
Expires
Fri, Nov 29, 00:45 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22592740
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