query = $query; } //findAllByNewsletter public function getByNewsletter(Newsletter $newsletter, $query = null): array { if (is_null($query)) { $query = $this->query->create(); } $query ->filterByNewsletter($newsletter); return $query->find(); } //findByRole public function getByRole(string $role): array { $query = $this->query->create(); $query ->filterByRole($role); return $query->find(); } //findByTicketTypesNotification public function getByTicketTypesNotification(string $ticketType): array { $query = $this->query->create(); $query ->filterByTicketTypeNotification($ticketType); return $query->find(); } public function getOneByEmail(string $email) { $query = $this->query->create(); $query ->filterByEmail($email); return $query->findOne(); } }