public function getPages($rootPageId = 'SITE_ROOT', $maxDepth = 999)
    {
        $pageIds = [];
        if ($rootPageId === 'SITE_ROOT') {
            $rootPageId = (int)$this->rootPage['uid'];
            $pageIds[] = $rootPageId;
        }

        $configurationAwareRecordService = GeneralUtility::makeInstance(ConfigurationAwareRecordService::class);
        // Fetch configuration in order to be able to read initialPagesAdditionalWhereClause
        $solrConfiguration = $this->getSolrConfiguration();
        $indexQueueConfigurationName = $configurationAwareRecordService->getIndexingConfigurationName('pages', $this->rootPage['uid'], $solrConfiguration);
        $initialPagesAdditionalWhereClause = $solrConfiguration->getInitialPagesAdditionalWhereClause($indexQueueConfigurationName);

        return array_merge($pageIds, $this->pagesRepository->findAllSubPageIdsByRootPage($rootPageId, $maxDepth, $initialPagesAdditionalWhereClause));
    }