src/ORM/Hierarchy/Hierarchy.php
public function AllHistoricalChildren()
    {
        /** @var DataObject|Versioned|Hierarchy $owner */
        $owner = $this->owner;
        if (!$owner->hasExtension(Versioned::class) || !$owner->hasStages()) {
            throw new Exception(
                'Hierarchy->AllHistoricalChildren() only works with Versioned extension applied with staging'
            );
        }

        $baseTable = $owner->baseTable();
        $parentIDColumn = $owner->getSchema()->sqlColumnForField($owner, 'ParentID');
        return Versioned::get_including_deleted(
            $owner->baseClass(),
            [ $parentIDColumn => $owner->ID ],
            "\"{$baseTable}\".\"ID\" ASC"
        );
    }
public function AllHistoricalChildren()
    {
        /** @var DataObject|Versioned|Hierarchy $owner */
        $owner = $this->owner;
        if (!$owner->hasExtension(Versioned::class) || !$owner->hasStages()) {
            throw new Exception(
                'Hierarchy->AllHistoricalChildren() only works with Versioned extension applied with staging'
            );
        }

        $baseTable = $owner->baseTable();
        $parentIDColumn = $owner->getSchema()->sqlColumnForField($owner, 'ParentID');
        return Versioned::get_including_deleted(
            $owner->baseClass(),
            [ $parentIDColumn => $owner->ID ],
            "\"{$baseTable}\".\"ID\" ASC"
        );
    }
public function AllHistoricalChildren ( ) { /** @var DataObject|Versioned|Hierarchy $owner */ $ owner = $ this -> owner ; if ( ! $ owner -> hasExtension ( Versioned :: class ) || ! $ owner -> hasStages ( ) ) { throw new Exception ( 'Hierarchy->AllHistoricalChildren() only works with Versioned extension applied with staging' ) ; } $ baseTable = $ owner -> baseTable ( ) ; $ parentIDColumn = $ owner -> getSchema ( ) -> sqlColumnForField ( $ owner , 'ParentID' ) ; return Versioned :: get_including_deleted ( $ owner -> baseClass ( ) , [ $ parentIDColumn => $ owner -> ID ] , "\"{$baseTable}\".\"ID\" ASC" ) ; }
Return all the children that this page had, including pages that were deleted from both stage & live.

@return DataList
@throws Exception
Return all the children that this page had including pages that were deleted from both stage & live .