mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-24 07:42:40 +01:00
27 lines
579 B
PHP
27 lines
579 B
PHP
|
<?php
|
||
|
|
||
|
final class HeraldTranscriptDestructionEngineExtension
|
||
|
extends PhabricatorDestructionEngineExtension {
|
||
|
|
||
|
const EXTENSIONKEY = 'herald.transcripts';
|
||
|
|
||
|
public function getExtensionName() {
|
||
|
return pht('Herald Transcripts');
|
||
|
}
|
||
|
|
||
|
public function destroyObject(
|
||
|
PhabricatorDestructionEngine $engine,
|
||
|
$object) {
|
||
|
|
||
|
$object_phid = $object->getPHID();
|
||
|
|
||
|
$transcripts = id(new HeraldTranscript())->loadAllWhere(
|
||
|
'objectPHID = %s',
|
||
|
$object_phid);
|
||
|
foreach ($transcripts as $transcript) {
|
||
|
$engine->destroyObject($transcript);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|