1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-16 03:42:41 +01:00
phorge-phorge/src/applications/system/management/PhabricatorSystemRemoveLogWorkflow.php

32 lines
816 B
PHP
Raw Normal View History

<?php
final class PhabricatorSystemRemoveLogWorkflow
extends PhabricatorSystemRemoveWorkflow {
public function didConstruct() {
$this
->setName('log')
->setSynopsis(pht('Show a log of permanently destroyed objects.'))
->setExamples('**log**')
->setArguments(array());
}
public function execute(PhutilArgumentParser $args) {
$console = PhutilConsole::getConsole();
$table = new PhabricatorSystemDestructionLog();
foreach (new LiskMigrationIterator($table) as $row) {
$console->writeOut(
"[%s]\t%s %s\t%s\t%s\n",
phabricator_datetime($row->getEpoch(), $this->getViewer()),
($row->getRootLogID() ? ' ' : '*'),
$row->getObjectClass(),
$row->getObjectPHID(),
$row->getObjectMonogram());
}
return 0;
}
}