mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
refactor: Upgrade repositories.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user