Merge branch 'feature/various-ux' into develop

This commit is contained in:
Maël Gangloff
2025-11-02 13:45:07 +01:00
10 changed files with 298 additions and 88 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Repository;
use App\Entity\User;
use App\Entity\Watchlist;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
@@ -33,6 +34,24 @@ class WatchlistRepository extends ServiceEntityRepository
->getQuery()->execute();
}
/**
* @return Watchlist[]
*/
public function fetchWatchlistsForUser(User $user): array
{
return $this->createQueryBuilder('w')
->addSelect('d')
->addSelect('e')
->addSelect('p')
->leftJoin('w.domains', 'd')
->leftJoin('d.events', 'e')
->leftJoin('d.domainPurchases', 'p')
->where('w.user = :user')
->setParameter('user', $user)
->getQuery()
->getResult();
}
// /**
// * @return Watchlist[] Returns an array of Watchlist objects
// */