You are here

protected function DisplayFileList::createUpDirContent in Filebrowser 3.x

Same name and namespace in other branches
  1. 8.2 src/File/DisplayFileList.php \Drupal\filebrowser\File\DisplayFileList::createUpDirContent()
1 call to DisplayFileList::createUpDirContent()
DisplayFileList::processServerFileList in src/File/DisplayFileList.php

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\File

Code

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'] = '..';
}