You are here

public static function FillPdf::buildFileUri in FillPDF 5.0.x

Same name and namespace in other branches
  1. 8.4 src/Component/Utility/FillPdf.php \Drupal\fillpdf\Component\Utility\FillPdf::buildFileUri()

Constructs a URI to a location given a relative path.

Parameters

string $scheme: A valid stream wrapper, such as 'public' or 'private'.

string $path: The path component that should come after the stream wrapper.

Return value

string The normalized URI.

5 calls to FillPdf::buildFileUri()
FillPdfFormForm::form in src/Form/FillPdfFormForm.php
Gets the actual form array to be built.
FillPdfOverviewForm::buildForm in src/Form/FillPdfOverviewForm.php
Form constructor.
FillPdfSettingsForm::validateForm in src/Form/FillPdfSettingsForm.php
Form validation handler.
FillPdfUploadTestBase::assertUploadPdfFile in tests/src/Functional/FillPdfUploadTestBase.php
Asserts that a PDF file may be properly uploaded as a template.
OutputHandler::processDestinationPath in src/OutputHandler.php
Processes the destination path.

File

src/Component/Utility/FillPdf.php, line 82

Class

FillPdf
Class FillPdf.

Namespace

Drupal\fillpdf\Component\Utility

Code

public static function buildFileUri($scheme, $path) {
  $uri = $scheme . '://' . $path;

  /** @var \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $streamWrapperManager */
  $streamWrapperManager = \Drupal::service('stream_wrapper_manager');
  return $streamWrapperManager
    ->normalizeUri($uri);
}