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 Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* @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
|
||||
final class ResourceRepository
|
||||
{
|
||||
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