protected function getCurrentFolder()
    {
        if ($this->currentFolder === false) {
            $currentFolder = null;
            $fID = $this->request->request->get('currentFolder', $this->request->query->get('currentFolder'));
            if ($fID && is_scalar($fID)) {
                $fID = (int) $fID;
                if ($fID !== 0) {
                    $node = Node::getByID($fID);
                    if ($node instanceof FileFolder) {
                        $currentFolder = $node;
                    }
                }
            }
            $this->setCurrentFolder($currentFolder);
        }

        return $this->currentFolder;
    }