protected function collateDescendants($recordIDs, &$collator)
    {

        $children = SiteTree::get()->filter(['ParentID' => $recordIDs])->column();
        if ($children) {
            foreach ($children as $item) {
                $collator[] = $item;
            }
            $this->collateDescendants($children, $collator);
            return true;
        }
        return false;
    }
protected function collateDescendants($recordIDs, &$collator)
    {

        $children = SiteTree::get()->filter(['ParentID' => $recordIDs])->column();
        if ($children) {
            foreach ($children as $item) {
                $collator[] = $item;
            }
            $this->collateDescendants($children, $collator);
            return true;
        }
        return false;
    }
protected function collateDescendants ( $ recordIDs , & $ collator ) { $ children = SiteTree :: get ( ) -> filter ( [ 'ParentID' => $ recordIDs ] ) -> column ( ) ; if ( $ children ) { foreach ( $ children as $ item ) { $ collator [ ] = $ item ; } $ this -> collateDescendants ( $ children , $ collator ) ; return true ; } return false ; }
Find IDs of all descendant pages for the provided ID lists.
@param int[] $recordIDs
@param array $collator
@return bool
Find IDs of all descendant pages for the provided ID lists .