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/CommandRepository.php
<?php namespace App\Repository; use App\Entity\Command; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Symfony\Bridge\Doctrine\RegistryInterface; /** * @method Command|null find($id, $lockMode = null, $lockVersion = null) * @method Command|null findOneBy(array $criteria, array $orderBy = null) * @method Command[] findAll() * @method Command[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) */ class CommandRepository extends ServiceEntityRepository { public function __construct(RegistryInterface $registry) { parent::__construct($registry, Command::class); } // /** // * @return Command[] Returns an array of Command objects // */ /* public function findByExampleField($value) { return $this->createQueryBuilder('c') ->andWhere('c.exampleField = :val') ->setParameter('val', $value) ->orderBy('c.id', 'ASC') ->setMaxResults(10) ->getQuery() ->getResult() ; } */ /* public function findOneBySomeField($value): ?Command { return $this->createQueryBuilder('c') ->andWhere('c.exampleField = :val') ->setParameter('val', $value) ->getQuery() ->getOneOrNullResult() ; } */ public function totalNewProduct() { return $this->createQueryBuilder('c') ->select('count(c.id)') ->where('c.stape is null') ->orwhere("c.stape = 'Commande Expédiée' ") ->orwhere("c.stape = 'Paiement Accepté' ") ->getQuery()->getSingleScalarResult(); } public function derniereCommande() { return $this->createQueryBuilder('a') ->select('MAX(a.id) as maxOrder') ->getQuery() ->getSingleScalarResult(); ; } }