query = $query; } public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { return $query; } public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { return $query; } public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { return $query; } // findLatests public function getLatests(int $maxResults = 0, $query = null): array { $query = $this->createDefaultQuery($query); $query ->filterIsOnline() ->orderBy('.date', 'DESC'); if ($maxResults) { $query->limit($maxResults); } return $query->find(); } }