<?php namespace Lc\ShopBundle\Repository; use Lc\ShopBundle\Context\DefaultRepositoryInterface; use Lc\ShopBundle\Context\PointSaleInterface; /** * @method PointSaleInterface|null find($id, $lockMode = null, $lockVersion = null) * @method PointSaleInterface|null findOneBy(array $criteria, array $orderBy = null) * @method PointSaleInterface[] findAll() * @method PointSaleInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) */ class PointSaleRepository extends BaseRepository implements DefaultRepositoryInterface { public function getInterfaceClass() { return PointSaleInterface::class; } public function findAllByMerchant() { return $this->createQueryBuilder('e') ->where(':currentMerchant MEMBER OF e.merchants') ->andWhere('e.status = 1') ->setParameter('currentMerchant', $this->merchantUtils->getMerchantCurrent()) ->getQuery() ->getResult() ; } }