public function ChildrenOf($parentRef)
    {
        $parent = SiteTree::get_by_link($parentRef);

        if (!$parent && is_numeric($parentRef)) {
            $parent = DataObject::get_by_id(SiteTree::class, $parentRef);
        }

        if ($parent) {
            return $parent->Children();
        }
        return null;
    }
public function ChildrenOf($parentRef)
    {
        $parent = SiteTree::get_by_link($parentRef);

        if (!$parent && is_numeric($parentRef)) {
            $parent = DataObject::get_by_id(SiteTree::class, $parentRef);
        }

        if ($parent) {
            return $parent->Children();
        }
        return null;
    }
public function ChildrenOf ( $ parentRef ) { $ parent = SiteTree :: get_by_link ( $ parentRef ) ; if ( ! $ parent && is_numeric ( $ parentRef ) ) { $ parent = DataObject :: get_by_id ( SiteTree :: class , $ parentRef ) ; } if ( $ parent ) { return $ parent -> Children ( ) ; } return null ; }
Return the children of a given page. The parent reference can either be a page link or an ID.

@param string|int $parentRef
@return SS_List
Return the children of a given page . The parent reference can either be a page link or an ID .