implemented user lists

This commit is contained in:
Michel Fedde 2024-07-06 22:18:37 +02:00
parent 3218253076
commit c3e81ce6ea
16 changed files with 365 additions and 74 deletions

View file

@ -10,6 +10,7 @@ use GamesShop\Entities\Games\Game;
use GamesShop\Entities\Games\Key;
use GamesShop\Entities\Games\KeyAttribute;
use GamesShop\Entities\Games\Store;
use GamesShop\Entities\GamesList;
use PhpOffice\PhpSpreadsheet\IOFactory;
final class GameImporter
@ -75,7 +76,7 @@ final class GameImporter
/**
* @param string[] $columnDefinitions
*/
public function import(string $path, array $columnDefinitions, User $contributedUser): array {
public function import(string $path, array $columnDefinitions, GamesList $list): array {
$spreadsheet = IOFactory::load($path);
$worksheet = $spreadsheet->getSheet(0);
@ -129,7 +130,7 @@ final class GameImporter
$key = new Key(
$game,
$contributedUser,
$list,
$values['key'],
$values['store'],
$values['store_link'],