Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. <?php
  2. namespace App\Repository;
  3. use App\Entity\Role;
  4. use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
  5. use Symfony\Bridge\Doctrine\RegistryInterface;
  6. /**
  7. * @method Role|null find($id, $lockMode = null, $lockVersion = null)
  8. * @method Role|null findOneBy(array $criteria, array $orderBy = null)
  9. * @method Role[] findAll()
  10. * @method Role[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
  11. */
  12. class RoleRepository extends ServiceEntityRepository
  13. {
  14. public function __construct(RegistryInterface $registry)
  15. {
  16. parent::__construct($registry, Role::class);
  17. }
  18. // /**
  19. // * @return Role[] Returns an array of Role objects
  20. // */
  21. /*
  22. public function findByExampleField($value)
  23. {
  24. return $this->createQueryBuilder('r')
  25. ->andWhere('r.exampleField = :val')
  26. ->setParameter('val', $value)
  27. ->orderBy('r.id', 'ASC')
  28. ->setMaxResults(10)
  29. ->getQuery()
  30. ->getResult()
  31. ;
  32. }
  33. */
  34. /*
  35. public function findOneBySomeField($value): ?Role
  36. {
  37. return $this->createQueryBuilder('r')
  38. ->andWhere('r.exampleField = :val')
  39. ->setParameter('val', $value)
  40. ->getQuery()
  41. ->getOneOrNullResult()
  42. ;
  43. }
  44. */
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement