andWhereSection($this->id, $section); } public function filterByMerchantViaSection(MerchantInterface $merchant) { $this->joinSection(); return $this->andWhere('s.merchant = :merchant') ->setParameter('merchant', $merchant); } public function joinSection(): self { if (!$this->isJoinSection) { $this->isJoinSection = true; return $this ->leftJoin('.section', 's'); } return $this; } }