public function getSubpagesUids(int $pid, int $recursion = 1, bool $exclude = true): array {
    $subpagesUids = [];
    $treeList     = $this->queryGenerator->getTreeList($pid, $recursion, 0, 1);
    $recordUids   = GeneralUtility::intExplode(',', $treeList, true);

    if ($recordUids) {
      foreach ($recordUids as $recordUid) {
        if ($this->getPage($recordUid)) {
          $subpagesUids[] = $recordUid;
        }
      }
    }

    if ($exclude) {
      unset($subpagesUids[0]);
    }

    return $subpagesUids;
  }
public function getSubpagesUids(int $pid, int $recursion = 1, bool $exclude = true): array {
    $subpagesUids = [];
    $treeList     = $this->queryGenerator->getTreeList($pid, $recursion, 0, 1);
    $recordUids   = GeneralUtility::intExplode(',', $treeList, true);

    if ($recordUids) {
      foreach ($recordUids as $recordUid) {
        if ($this->getPage($recordUid)) {
          $subpagesUids[] = $recordUid;
        }
      }
    }

    if ($exclude) {
      unset($subpagesUids[0]);
    }

    return $subpagesUids;
  }
public function getSubpagesUids ( int $ pid , int $ recursion = 1 , bool $ exclude = true ) : array { $ subpagesUids = [ ] ; $ treeList = $ this -> queryGenerator -> getTreeList ( $ pid , $ recursion , 0 , 1 ) ; $ recordUids = GeneralUtility :: intExplode ( ',' , $ treeList , true ) ; if ( $ recordUids ) { foreach ( $ recordUids as $ recordUid ) { if ( $ this -> getPage ( $ recordUid ) ) { $ subpagesUids [ ] = $ recordUid ; } } } if ( $ exclude ) { unset ( $ subpagesUids [ 0 ] ) ; } return $ subpagesUids ; }
Gets the subpages UIDs of a page.

@param int $pid The PID of the entry page to search from
@param int $recursion The recursion level, defaults to `1`
@param bool $exclude If set, the entry page should be excluded, defaults to `true`
@return array The subpages UIDs or empty if no subpages were found
Gets the subpages UIDs of a page .