Files
crowd-fund-api/src/Repository/ThemeRepository.php
T
daniel.subiabre ac47aec378 feat: Themes (#257)
* feat: add trait to unify get by id or slug logic

* feat: add Theme resource

* fix: categories and themes

* feat: update api docs for projects to themes relationship

* feat: update doctrine relationship of projects to themes

* feat: add v3 categories to v4 themes pumping during projects pumping
2026-10-08 13:02:07 +02:00

46 lines
1.2 KiB
PHP

<?php
namespace App\Repository;
use App\Entity\Theme;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Theme>
*/
class ThemeRepository extends ServiceEntityRepository
{
use FindByIdOrSlugTrait;
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Theme::class);
}
// /**
// * @return Theme[] Returns an array of Theme objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('t')
// ->andWhere('t.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('t.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Theme
// {
// return $this->createQueryBuilder('t')
// ->andWhere('t.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}