mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
refactor: Upgrade repositories.
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
namespace Chill\PersonBundle\Repository\SocialWork;
|
||||
|
||||
use Chill\PersonBundle\Entity\SocialWork\Evaluation;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* @method Evaluation|null find($id, $lockMode = null, $lockVersion = null)
|
||||
@@ -12,10 +12,12 @@ use Doctrine\Persistence\ManagerRegistry;
|
||||
* @method Evaluation[] findAll()
|
||||
* @method Evaluation[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class EvaluationRepository extends ServiceEntityRepository
|
||||
final class EvaluationRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
private EntityRepository $repository;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager)
|
||||
{
|
||||
parent::__construct($registry, Evaluation::class);
|
||||
$this->repository = $entityManager->getRepository(Evaluation::class);
|
||||
}
|
||||
}
|
||||
|
@@ -3,8 +3,8 @@
|
||||
namespace Chill\PersonBundle\Repository\SocialWork;
|
||||
|
||||
use Chill\PersonBundle\Entity\SocialWork\Goal;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* @method Goal|null find($id, $lockMode = null, $lockVersion = null)
|
||||
@@ -12,10 +12,12 @@ use Doctrine\Persistence\ManagerRegistry;
|
||||
* @method Goal[] findAll()
|
||||
* @method Goal[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class GoalRepository extends ServiceEntityRepository
|
||||
final class GoalRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
private EntityRepository $repository;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager)
|
||||
{
|
||||
parent::__construct($registry, Goal::class);
|
||||
$this->repository = $entityManager->getRepository(Goal::class);
|
||||
}
|
||||
}
|
||||
|
@@ -3,8 +3,8 @@
|
||||
namespace Chill\PersonBundle\Repository\SocialWork;
|
||||
|
||||
use Chill\PersonBundle\Entity\SocialWork\Result;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* @method Result|null find($id, $lockMode = null, $lockVersion = null)
|
||||
@@ -12,10 +12,12 @@ use Doctrine\Persistence\ManagerRegistry;
|
||||
* @method Result[] findAll()
|
||||
* @method Result[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class ResultRepository extends ServiceEntityRepository
|
||||
final class ResultRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
private EntityRepository $repository;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager)
|
||||
{
|
||||
parent::__construct($registry, Result::class);
|
||||
$this->repository = $entityManager->getRepository(Result::class);
|
||||
}
|
||||
}
|
||||
|
@@ -3,8 +3,8 @@
|
||||
namespace Chill\PersonBundle\Repository\SocialWork;
|
||||
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* @method SocialAction|null find($id, $lockMode = null, $lockVersion = null)
|
||||
@@ -12,10 +12,12 @@ use Doctrine\Persistence\ManagerRegistry;
|
||||
* @method SocialAction[] findAll()
|
||||
* @method SocialAction[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class SocialActionRepository extends ServiceEntityRepository
|
||||
final class SocialActionRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
private EntityRepository $repository;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager)
|
||||
{
|
||||
parent::__construct($registry, SocialAction::class);
|
||||
$this->repository = $entityManager->getRepository(SocialAction::class);
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,8 @@ namespace Chill\PersonBundle\Repository\SocialWork;
|
||||
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* @method SocialIssue|null find($id, $lockMode = null, $lockVersion = null)
|
||||
@@ -12,10 +13,12 @@ use Doctrine\Persistence\ManagerRegistry;
|
||||
* @method SocialIssue[] findAll()
|
||||
* @method SocialIssue[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class SocialIssueRepository extends ServiceEntityRepository
|
||||
final class SocialIssueRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
private EntityRepository $repository;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager)
|
||||
{
|
||||
parent::__construct($registry, SocialIssue::class);
|
||||
$this->repository = $entityManager->getRepository(SocialIssue::class);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user