mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix missing ::find method.
This commit is contained in:
parent
d672a29dda
commit
1f4735caac
@ -24,21 +24,19 @@ namespace Chill\PersonBundle\Repository\AccompanyingPeriod;
|
|||||||
|
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\Resource;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod\Resource;
|
||||||
use Doctrine\ORM\EntityRepository;
|
use Doctrine\ORM\EntityRepository;
|
||||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Doctrine\Persistence\ManagerRegistry;
|
|
||||||
|
|
||||||
/**
|
final class ResourceRepository
|
||||||
* @method Resource|null find($id, $lockMode = null, $lockVersion = null)
|
|
||||||
* @method Resource|null findOneBy(array $criteria, array $orderBy = null)
|
|
||||||
* @method Resource[] findAll()
|
|
||||||
* @method Resource[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
|
||||||
*/
|
|
||||||
final class ResourceRepository extends ServiceEntityRepository
|
|
||||||
{
|
{
|
||||||
private EntityRepository $repository;
|
private EntityRepository $repository;
|
||||||
|
|
||||||
public function __construct(ManagerRegistry $registry)
|
public function __construct(EntityManagerInterface $entityManager)
|
||||||
{
|
{
|
||||||
parent::__construct($registry, Resource::class);
|
$this->repository = $entityManager->getRepository(Resource::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function find($id, $lockMode = null, $lockVersion = null): ?Resource
|
||||||
|
{
|
||||||
|
return $this->repository->find($id, $lockMode, $lockVersion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user