function FileUrlGenerator::__construct

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/File/FileUrlGenerator.php \Drupal\Core\File\FileUrlGenerator::__construct()
  2. 10 core/lib/Drupal/Core/File/FileUrlGenerator.php \Drupal\Core\File\FileUrlGenerator::__construct()
  3. 9 core/lib/Drupal/Core/File/FileUrlGenerator.php \Drupal\Core\File\FileUrlGenerator::__construct()

Constructs a new file URL generator object.

Parameters

\Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $streamWrapperManager: The stream wrapper manager.

\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack.

\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: The module handler.

File

core/lib/Drupal/Core/File/FileUrlGenerator.php, line 28

Class

FileUrlGenerator
Default implementation for the file URL generator service.

Namespace

Drupal\Core\File

Code

public function __construct(protected StreamWrapperManagerInterface $streamWrapperManager, protected RequestStack $requestStack, protected ModuleHandlerInterface $moduleHandler) {
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.