mirror of
https://github.com/werkraum-media/events.git
synced 2024-11-22 18:16:10 +01:00
Daniel Siepmann
a9f3f108e3
The vendor was renamed from `wrm` to `werkraummedia`. And the namespace vendor was renamed from `Wrm` to `WerkraumMedia`. That way all references to PHP classes as well as the package name itself need to be adjusted.
39 lines
964 B
PHP
39 lines
964 B
PHP
<?php
|
|
|
|
namespace WerkraumMedia\Events\Command;
|
|
|
|
use Symfony\Component\Console\Command\Command;
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
use TYPO3\CMS\Core\Core\Bootstrap;
|
|
use WerkraumMedia\Events\Service\CleanupService;
|
|
|
|
class RemoveAllCommand extends Command
|
|
{
|
|
/**
|
|
* @var CleanupService
|
|
*/
|
|
private $cleanupService;
|
|
|
|
public function __construct(
|
|
CleanupService $cleanupService
|
|
) {
|
|
$this->cleanupService = $cleanupService;
|
|
|
|
parent::__construct();
|
|
}
|
|
|
|
public function configure(): void
|
|
{
|
|
$this->setDescription('Remove all event data');
|
|
$this->setHelp('All events and associated data will be removed.');
|
|
}
|
|
|
|
protected function execute(InputInterface $input, OutputInterface $output)
|
|
{
|
|
Bootstrap::initializeBackendAuthentication();
|
|
$this->cleanupService->deleteAllData();
|
|
|
|
return 0;
|
|
}
|
|
}
|