src/ORM/Hierarchy/Hierarchy.php
public function getParent($filter = null)
    {
        $parentID = $this->owner->ParentID;
        if (empty($parentID)) {
            return null;
        }
        $baseClass = $this->owner->baseClass();
        $idSQL = $this->owner->getSchema()->sqlColumnForField($baseClass, 'ID');
        return DataObject::get_one($baseClass, [
            [$idSQL => $parentID],
            $filter
        ]);
    }
public function getParent($filter = null)
    {
        $parentID = $this->owner->ParentID;
        if (empty($parentID)) {
            return null;
        }
        $baseClass = $this->owner->baseClass();
        $idSQL = $this->owner->getSchema()->sqlColumnForField($baseClass, 'ID');
        return DataObject::get_one($baseClass, [
            [$idSQL => $parentID],
            $filter
        ]);
    }
public function getParent ( $ filter = null ) { $ parentID = $ this -> owner -> ParentID ; if ( empty ( $ parentID ) ) { return null ; } $ baseClass = $ this -> owner -> baseClass ( ) ; $ idSQL = $ this -> owner -> getSchema ( ) -> sqlColumnForField ( $ baseClass , 'ID' ) ; return DataObject :: get_one ( $ baseClass , [ [ $ idSQL => $ parentID ] , $ filter ] ) ; }
Get this object's parent, optionally filtered by an SQL clause. If the clause doesn't match the parent, nothing
is returned.

@param string $filter
@return DataObject
Get this object s parent optionally filtered by an SQL clause . If the clause doesn t match the parent nothing is returned .