Chris@0: getTarget()); Chris@18: return Url::fromRoute('system.private_file_download', ['filepath' => $path], ['absolute' => TRUE, 'path_processing' => FALSE])->toString(); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Returns the base path for private://. Chris@0: * Chris@0: * Note that this static method is used by \Drupal\system\Form\FileSystemForm Chris@0: * so you should alter that form or substitute a different form if you change Chris@0: * the class providing the stream_wrapper.private service. Chris@0: * Chris@0: * @return string Chris@0: * The base path for private://. Chris@0: */ Chris@0: public static function basePath() { Chris@0: return Settings::get('file_private_path'); Chris@0: } Chris@0: Chris@0: }