protected function getPageUids(int $pid = 1, int $recursion = 99, string $exclude = '') {
    $exclude       = $exclude === '-' ? '' : $exclude;
    $exclude       = GeneralUtility::intExplode(',', $exclude, true);
    $pagesTreeList = $this->queryGenerator->getTreeList($pid, $recursion, 0, 1);
    $pageUids      = GeneralUtility::intExplode(',', $pagesTreeList, true);
    $pageUids      = array_diff($pageUids, $exclude);

    return $pageUids;
  }