feat: Let occ deck:import default to deck json importer

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2023-07-19 09:52:44 +02:00
parent cccc4f2f67
commit e7d5fbff63
7 changed files with 146 additions and 17 deletions

View File

@@ -84,6 +84,8 @@ class BoardImportService {
) {
$this->board = new Board();
$this->disableCommentsEvents();
$this->config = new \stdClass();
}
private function disableCommentsEvents(): void {
@@ -151,6 +153,11 @@ class BoardImportService {
public function getAllowedImportSystems(): array {
if (!$this->allowedSystems) {
$this->addAllowedImportSystem([
'name' => DeckJsonService::$name,
'class' => DeckJsonService::class,
'internalName' => 'DeckJson'
]);
$this->addAllowedImportSystem([
'name' => TrelloApiService::$name,
'class' => TrelloApiService::class,
@@ -161,11 +168,6 @@ class BoardImportService {
'class' => TrelloJsonService::class,
'internalName' => 'TrelloJson'
]);
$this->addAllowedImportSystem([
'name' => DeckJsonService::$name,
'class' => DeckJsonService::class,
'internalName' => 'DeckJson'
]);
}
$this->eventDispatcher->dispatchTyped(new BoardImportGetAllowedEvent($this));
return $this->allowedSystems;