query = $query; } public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { $query->orderBy('id'); return $query; } public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { return $query; } public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { return $query; } // findAllByNewsletter public function getByNewsletter(Newsletter $newsletter, $query = null): array { $query = $this->createQuery($query); $query->filterByNewsletter($newsletter); return $query->find(); } // findByRole public function getByRole(string $role, $query = null): array { $query = $this->createQuery($query); $query->filterByRole($role); return $query->find(); } // findByTicketTypesNotification public function getByTicketTypesNotification(string $ticketType, $query = null): array { $query = $this->createQuery($query); $query->filterByTicketTypeNotification($ticketType); return $query->find(); } public function getOneByEmail(string $email, $query = null) { $query = $this->createQuery($query); $query->filterByEmail($email); return $query->findOne(); } }