Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
www.humitest.fr
/
htdocs
/
src
/
Repository
/
/srv/data/web/vhosts/www.humitest.fr/htdocs/src/Repository/PriceDiscountRepository.php
<?php namespace App\Repository; use App\Entity\Product; use App\Entity\PriceDiscount; use App\Entity\CategoryDiscount; use Doctrine\Common\Persistence\ManagerRegistry; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; /** * @method PriceDiscount|null find($id, $lockMode = null, $lockVersion = null) * @method PriceDiscount|null findOneBy(array $criteria, array $orderBy = null) * @method PriceDiscount[] findAll() * @method PriceDiscount[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) */ class PriceDiscountRepository extends ServiceEntityRepository { public function __construct(ManagerRegistry $registry) { parent::__construct($registry, PriceDiscount::class); } public function isExist(CategoryDiscount $categoryDiscount, Product $product) { return $this->createQueryBuilder('c') ->andWhere('c.categoryDiscount = :category') ->setParameter('category', $categoryDiscount) ->andWhere('c.product = :product') ->setParameter('product', $product) ->getQuery() ->getResult() ; } // /** // * @return PriceDiscount[] Returns an array of PriceDiscount objects // */ /* public function findByExampleField($value) { return $this->createQueryBuilder('p') ->andWhere('p.exampleField = :val') ->setParameter('val', $value) ->orderBy('p.id', 'ASC') ->setMaxResults(10) ->getQuery() ->getResult() ; } */ /* public function findOneBySomeField($value): ?PriceDiscount { return $this->createQueryBuilder('p') ->andWhere('p.exampleField = :val') ->setParameter('val', $value) ->getQuery() ->getOneOrNullResult() ; } */ public function findPriceDiscount() { return $this->createQueryBuilder('a') ->select('a.name') ->from('categoryDiscount','a') // ->leftJoin('a', 'category_discount.id =a.category_discount_id' ) ->andwhere('category_discount_id IS NULL'); } }