src/Repository/FabricationPageRepository.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Repository;
  3. use App\Entity\FabricationPage;
  4. use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
  5. use Doctrine\ORM\OptimisticLockException;
  6. use Doctrine\ORM\ORMException;
  7. use Doctrine\Persistence\ManagerRegistry;
  8. /**
  9.  * @method FabricationPage|null find($id, $lockMode = null, $lockVersion = null)
  10.  * @method FabricationPage|null findOneBy(array $criteria, array $orderBy = null)
  11.  * @method FabricationPage[]    findAll()
  12.  * @method FabricationPage[]    findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
  13.  */
  14. class FabricationPageRepository extends ServiceEntityRepository
  15. {
  16.     public function __construct(ManagerRegistry $registry)
  17.     {
  18.         parent::__construct($registryFabricationPage::class);
  19.     }
  20.     /**
  21.      * @throws ORMException
  22.      * @throws OptimisticLockException
  23.      */
  24.     public function add(FabricationPage $entitybool $flush true): void
  25.     {
  26.         $this->_em->persist($entity);
  27.         if ($flush) {
  28.             $this->_em->flush();
  29.         }
  30.     }
  31.     /**
  32.      * @throws ORMException
  33.      * @throws OptimisticLockException
  34.      */
  35.     public function remove(FabricationPage $entitybool $flush true): void
  36.     {
  37.         $this->_em->remove($entity);
  38.         if ($flush) {
  39.             $this->_em->flush();
  40.         }
  41.     }
  42.     // /**
  43.     //  * @return FabricationPage[] Returns an array of FabricationPage objects
  44.     //  */
  45.     /*
  46.     public function findByExampleField($value)
  47.     {
  48.         return $this->createQueryBuilder('f')
  49.             ->andWhere('f.exampleField = :val')
  50.             ->setParameter('val', $value)
  51.             ->orderBy('f.id', 'ASC')
  52.             ->setMaxResults(10)
  53.             ->getQuery()
  54.             ->getResult()
  55.         ;
  56.     }
  57.     */
  58.     /*
  59.     public function findOneBySomeField($value): ?FabricationPage
  60.     {
  61.         return $this->createQueryBuilder('f')
  62.             ->andWhere('f.exampleField = :val')
  63.             ->setParameter('val', $value)
  64.             ->getQuery()
  65.             ->getOneOrNullResult()
  66.         ;
  67.     }
  68.     */
  69. }