private function Presentation::sortIconViewFiles in Filebrowser 8.2
Same name and namespace in other branches
- 3.x src/Presentation.php \Drupal\filebrowser\Presentation::sortIconViewFiles()
1 call to Presentation::sortIconViewFiles()
File
- src/
Presentation.php, line 428
Class
Namespace
Drupal\filebrowserCode
private function sortIconViewFiles(&$source) {
/** @var DisplayFile $data */
$files = [];
$folders = [];
foreach ($source as $name => $data) {
if ($name != '.') {
if ($data->fileData->type == 'file') {
$files[$name] = $data;
}
else {
$folders[$name] = $data;
}
}
}
$source = $folders + $files;
}