You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PageRepository.php 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace Lc\ShopBundle\Repository;
  3. use App\Entity\Page;
  4. use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
  5. use Doctrine\Common\Persistence\ManagerRegistry;
  6. use Lc\ShopBundle\Repository\BaseRepository;
  7. /**
  8. * @method Page|null find($id, $lockMode = null, $lockVersion = null)
  9. * @method Page|null findOneBy(array $criteria, array $orderBy = null)
  10. * @method Page[] findAll()
  11. * @method Page[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
  12. */
  13. class PageRepository extends BaseRepository
  14. {
  15. public function __construct(ManagerRegistry $registry)
  16. {
  17. parent::__construct($registry, Page::class);
  18. }
  19. // /**
  20. // * @return Page[] Returns an array of Page objects
  21. // */
  22. /*
  23. public function findByExampleField($value)
  24. {
  25. return $this->createQueryBuilder('p')
  26. ->andWhere('p.exampleField = :val')
  27. ->setParameter('val', $value)
  28. ->orderBy('p.id', 'ASC')
  29. ->setMaxResults(10)
  30. ->getQuery()
  31. ->getResult()
  32. ;
  33. }
  34. */
  35. /*
  36. public function findOneBySomeField($value): ?Page
  37. {
  38. return $this->createQueryBuilder('p')
  39. ->andWhere('p.exampleField = :val')
  40. ->setParameter('val', $value)
  41. ->getQuery()
  42. ->getOneOrNullResult()
  43. ;
  44. }
  45. */
  46. }