suivi/src/Repository/BillCategoryRepository.php
Simon Vieille 688fdd49ee
add bill categories
add webdav client

change pdf viewer
2023-04-09 17:56:15 +02:00

67 lines
1.9 KiB
PHP

<?php
namespace App\Repository;
use App\Entity\BillCategory;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<BillCategory>
*
* @method BillCategory|null find($id, $lockMode = null, $lockVersion = null)
* @method BillCategory|null findOneBy(array $criteria, array $orderBy = null)
* @method BillCategory[] findAll()
* @method BillCategory[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class BillCategoryRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, BillCategory::class);
}
public function save(BillCategory $entity, bool $flush = false): void
{
$this->getEntityManager()->persist($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
public function remove(BillCategory $entity, bool $flush = false): void
{
$this->getEntityManager()->remove($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
// /**
// * @return BillCategory[] Returns an array of BillCategory objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('b')
// ->andWhere('b.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('b.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?BillCategory
// {
// return $this->createQueryBuilder('b')
// ->andWhere('b.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}