private function Presentation::splitFiles in Filebrowser 8.2
Same name and namespace in other branches
- 3.x src/Presentation.php \Drupal\filebrowser\Presentation::splitFiles()
1 call to Presentation::splitFiles()
File
- src/
Presentation.php, line 410
Class
Namespace
Drupal\filebrowserCode
private function splitFiles($files) {
// TODO : take data from $unsorted_rows and not $data
$result = [];
foreach ($files as $name => $data) {
if ($name == '.') {
continue;
}
elseif ($data->fileData->type == 'file') {
$result['files'][] = $data;
}
else {
// Do not retain the '.' folder
$result['folders'][] = $data;
}
}
return $result;
}