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 ->filterLikeRole($role); return $query->find(); } //findByTicketTypesNotification public function getByTicketTypesNotification(string $ticketType): array { $query = $this->query->create(); $query ->filterLikeTicketTypeNotification($ticketType); return $query->find(); } }