protected function DisplayFileList::createUpDirContent in Filebrowser 8.2
Same name and namespace in other branches
- 3.x src/File/DisplayFileList.php \Drupal\filebrowser\File\DisplayFileList::createUpDirContent()
1 call to DisplayFileList::createUpDirContent()
File
- src/
File/ DisplayFileList.php, line 371
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 createUpDirContent(&$array) {
$parent_path = $this
->parentFolder();
$content = $this->storage
->loadRecordFromPath($this->node
->id(), $parent_path);
if ($content) {
foreach ($content as $key => $value) {
$array[$key] = $value;
}
}
else {
\Drupal::messenger()
->addError($this
->t('No content in method LoadRecordFromPath'));
}
$array['exists'] = true;
$array['display_name'] = '..';
}