public function getFolderParent()
    {
        if ($this->isRootFolder()) {
            return null;
        }

        $parents = $this->getParents($this->getSession()->getDefaultContext());

        // return the first element of the array
        $parent = reset($parents);

        if (!$parent instanceof FolderInterface) {
            return null;
        }

        return $parent;
    }
public function getFolderParent()
    {
        if ($this->isRootFolder()) {
            return null;
        }

        $parents = $this->getParents($this->getSession()->getDefaultContext());

        // return the first element of the array
        $parent = reset($parents);

        if (!$parent instanceof FolderInterface) {
            return null;
        }

        return $parent;
    }
public function getFolderParent ( ) { if ( $ this -> isRootFolder ( ) ) { return null ; } $ parents = $ this -> getParents ( $ this -> getSession ( ) -> getDefaultContext ( ) ) ; // return the first element of the array $ parent = reset ( $ parents ) ; if ( ! $ parent instanceof FolderInterface ) { return null ; } return $ parent ; }
Gets the parent folder object.

@return FolderInterface|null the parent folder object or <code>null</code> if the folder is the root folder.
Gets the parent folder object .