joinUserPointSales(); return $this ->andWhere('userPointSales.user = :user') ->setParameter('user', $user); } public function filterByMerchant(MerchantInterface $merchant) { return $this ->andWhere(':merchant MEMBER OF .merchants') ->setParameter(':merchant', $merchant); } public function filterIsNotPublic(): self { return $this->andWhere('.isPublic = 0'); } public function filterIsPublic(): self { return $this->andWhere('.isPublic = 1'); } public function filterByIsPublic(int $isPublic): self { return $this->andWhere('.isPublic = ' . $isPublic); } public function filterLikeCode(string $code): self { return $this ->andWhere('.code LIKE :code') ->setParameter('code', $code); } public function joinUserPointSales(): self { if (!$this->isJoinUserPointSales) { $this->isJoinUserPointSales = true; return $this ->innerJoin('.userPointSales', 'userPointSales'); } return $this; } public function innerJoinDeliveryAvailabilityPointSale() { return $this->innerJoin('.deliveryAvailabilityPointSale'); } }