public function getPaginatedEntities(array $options = [], $hydrationMode = AbstractQuery::HYDRATE_OBJECT)
    {
        $options = PaginatedEntityRepositoryOptionsResolver::createAndResolve($options);
        $queryBuilder = $this->addPagination(
            $this->getQueryBuilder($options['filters'], $options['sorting']),
            $options['elementsPerPage'],
            $options['page']
        );

        return new Paginator($queryBuilder->getQuery()->setHydrationMode($hydrationMode));
    }