mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-06 17:41:01 +00:00
Make repositories use ServiceEntityRepository
This commit is contained in:
parent
51884911f5
commit
1bee0eeb29
11 changed files with 95 additions and 42 deletions
|
@ -2,10 +2,17 @@
|
|||
|
||||
namespace Wallabag\ApiBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Wallabag\ApiBundle\Entity\Client;
|
||||
|
||||
class ClientRepository extends EntityRepository
|
||||
class ClientRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Client::class);
|
||||
}
|
||||
|
||||
public function findOneBy(array $criteria, array $orderBy = null)
|
||||
{
|
||||
if (!empty($criteria['id'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue