1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 19:32:40 +01:00
phorge-phorge/src/applications/system/management/PhabricatorSystemRemoveLogWorkflow.php
Joshua Spence daadf95537 Fix visibility of PhutilArgumentWorkflow::didConstruct methods
Summary: Ref T6822.

Test Plan: `grep`. This method is only called from within `PhutilArgumentWorkflow::__construct`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6822

Differential Revision: https://secure.phabricator.com/D11415
2015-01-16 07:42:07 +11:00

31 lines
819 B
PHP

<?php
final class PhabricatorSystemRemoveLogWorkflow
extends PhabricatorSystemRemoveWorkflow {
protected 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;
}
}