vendor/roothirsch/pim-bundle/Repository/CategoryRepository.php line 17

Open in your IDE?
  1. <?php
  2. namespace Roothirsch\PimBundle\Repository;
  3. use Roothirsch\CoreBundle\Repository\AbstractTreeRepository;
  4. use Roothirsch\PimBundle\Entity\Category;
  5. use Doctrine\ORM\EntityManagerInterface;
  6. /**
  7. * @method Category|null find($id, $lockMode = null, $lockVersion = null)
  8. * @method Category|null findOneBy(array $criteria, array $orderBy = null)
  9. * @method Category[] findAll()
  10. * @method Category[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
  11. */
  12. class CategoryRepository extends AbstractTreeRepository
  13. {
  14. public function __construct(EntityManagerInterface $manager)
  15. {
  16. parent::__construct($manager, $manager->getClassMetadata(Category::class));
  17. }
  18. // /**
  19. // * @return Category[] Returns an array of Category objects
  20. // */
  21. /*
  22. public function findByExampleField($value)
  23. {
  24. return $this->createQueryBuilder('c')
  25. ->andWhere('c.exampleField = :val')
  26. ->setParameter('val', $value)
  27. ->orderBy('c.id', 'ASC')
  28. ->setMaxResults(10)
  29. ->getQuery()
  30. ->getResult()
  31. ;
  32. }
  33. */
  34. /*
  35. public function findOneBySomeField($value): ?Category
  36. {
  37. return $this->createQueryBuilder('c')
  38. ->andWhere('c.exampleField = :val')
  39. ->setParameter('val', $value)
  40. ->getQuery()
  41. ->getOneOrNullResult()
  42. ;
  43. }
  44. */
  45. }