Differential D25051 Diff 1391 src/applications/files/engineextension/PhabricatorFileAttachmentDestructionEngineExtension.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/engineextension/PhabricatorFileAttachmentDestructionEngineExtension.php
- This file was added.
<?php | |||||
final class PhabricatorFileAttachmentDestructionEngineExtension | |||||
extends PhabricatorDestructionEngineExtension { | |||||
avivey: I might not have enough coffee yet, but what and when is triggering this extension? | |||||
Done Inline ActionsDylsss: https://we.phorge.it/source/phorge/browse/master/src/applications/system/engine/PhabricatorDest… | |||||
const EXTENSIONKEY = 'file.attachments'; | |||||
public function getExtensionName() { | |||||
return pht('File Attachments'); | |||||
} | |||||
public function destroyObject( | |||||
PhabricatorDestructionEngine $engine, | |||||
$object) { | |||||
$attachments = id(new PhabricatorFileAttachment())->loadAllWhere( | |||||
'objectPHID = %s', | |||||
$object->getPHID()); | |||||
foreach ($attachments as $attachment) { | |||||
$attachment->delete(); | |||||
} | |||||
} | |||||
} |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
I might not have enough coffee yet, but what and when is triggering this extension?