You are here

public function FileFieldPathsDummyReadOnlyStreamWrapper::getExternalUrl in File (Field) Paths 8

Override getExternalUrl().

Return the HTML URI of a public file.

Overrides DummyReadOnlyStreamWrapper::getExternalUrl

File

tests/filefield_paths_test/src/StreamWrapper/FileFieldPathsDummyReadOnlyStreamWrapper.php, line 35

Class

FileFieldPathsDummyReadOnlyStreamWrapper
Helper class for testing the stream wrapper registry.

Namespace

Drupal\filefield_paths_test\StreamWrapper

Code

public function getExternalUrl() {
  $path = str_replace('\\', '/', $this
    ->getTarget());
  return PublicStream::baseUrl() . '/' . UrlHelper::encodePath($path);
}