andWhere('.codes LIKE :code') ->setParameter('code', '%'.$code.'%') ; } public function filterByUser(UserInterface $user) { return $this ->andWhere(':user MEMBER OF .users') ->setParameter('user', $user); } public function filterByType(string $type, string $operator = '=') { return $this ->andWhere('.type '.$operator.' :type') ->setParameter('type', $type); } }