Amélioration ; ajout de photo de console et ajout de checkbox physique, demat ou ROM

This commit is contained in:
LAINEY Grégory committed 2026-09-29 11:55:02 +02:00
1 parent df11d023f0
commit 3235bc50c7
22 files changed
+710 -62

No files matched your search

+18 -2
View File
@@ -15,7 +15,8 @@ final class JeuService
string $utilisateurId,
?string $recherche = null,
?string $consoleId = null,
?string $etat = null
?string $etat = null,
?string $format = null
): array
{
$jeux = $this->store->filtrer(
@@ -38,6 +39,19 @@ final class JeuService
));
}
if ($format !== null && $format !== "")
{
$jeux = array_values(array_filter(
$jeux,
static function (array $jeu) use ($format): bool
{
$formats = $jeu["formats"] ?? [];
return is_array($formats) && in_array($format, $formats, true);
}
));
}
if ($recherche !== null && $recherche !== "")
{
$terme = mb_strtolower($recherche);
@@ -50,7 +64,8 @@ final class JeuService
$jeu["description"] ?? "",
$jeu["editeur"] ?? "",
$jeu["developpeur"] ?? "",
implode(" ", $jeu["genres"] ?? [])
implode(" ", $jeu["genres"] ?? []),
implode(" ", $jeu["formats"] ?? [])
];
return str_contains(mb_strtolower(implode(" ", $champs)), $terme);
@@ -199,6 +214,7 @@ final class JeuService
"titre" => $titre,
"consoleId" => $consoleId,
"etat" => $etat,
"formats" => Helpers::normaliserFormats($donnees["formats"] ?? []),
"jaquette" => $jaquette,
"description" => trim((string) ($donnees["description"] ?? "")),
"dateSortie" => $this->normaliserDate($donnees["dateSortie"] ?? null),
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.