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.

33 line
1.1KB

  1. <?php
  2. namespace Lc\ShopBundle\Repository;
  3. use Lc\ShopBundle\Context\DefaultRepositoryInterface;
  4. use Lc\ShopBundle\Context\PointSaleInterface;
  5. /**
  6. * @method PointSaleInterface|null find($id, $lockMode = null, $lockVersion = null)
  7. * @method PointSaleInterface|null findOneBy(array $criteria, array $orderBy = null)
  8. * @method PointSaleInterface[] findAll()
  9. * @method PointSaleInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
  10. */
  11. class PointSaleRepository extends BaseRepository implements DefaultRepositoryInterface
  12. {
  13. public function getInterfaceClass()
  14. {
  15. return PointSaleInterface::class;
  16. }
  17. public function findAllPublics()
  18. {
  19. return $this->createQueryBuilder('e')
  20. ->where(':currentMerchant MEMBER OF e.merchants')
  21. ->andWhere('e.isPublic = 1')
  22. ->setParameter('currentMerchant', $this->merchantUtils->getMerchantCurrent())
  23. ->getQuery()
  24. ->getResult() ;
  25. }
  26. }