You are here

public function Common::relativePath in Filebrowser 3.x

Same name and namespace in other branches
  1. 8.2 src/Services/Common.php \Drupal\filebrowser\Services\Common::relativePath()

Gets the path of a parent folder.

Parameters

integer $fid Id of the folder to look-up:

Return value

string

File

src/Services/Common.php, line 396

Class

Common
Class Common @package Drupal\filebrowser\Services

Namespace

Drupal\filebrowser\Services

Code

public function relativePath($fid) {
  if (!$fid) {
    return NULL;
  }
  return $this->storage
    ->loadRecord($fid)['path'];
}