protected function DisplayFileList::parentFolder in Filebrowser 8.2
Same name and namespace in other branches
- 3.x src/File/DisplayFileList.php \Drupal\filebrowser\File\DisplayFileList::parentFolder()
1 call to DisplayFileList::parentFolder()
File
- src/
File/ DisplayFileList.php, line 386
Class
- DisplayFileList
- Class FileDisplayList @package Drupal\filebrowser This class holds the list of files to be displayed on the filebrowser node. These files are retrieved from the filesystem and filtered for user and node access. The array produced by this class…
Namespace
Drupal\filebrowser\FileCode
protected function parentFolder() {
$array = explode('/', $this->relativePath);
if (count($array) < 3) {
return '/';
}
else {
unset($array[count($array) - 1]);
return $result = implode('/', $array);
}
}