function AssetControllerBase::__construct

Same name and namespace in other branches
  1. 11.x core/modules/system/src/Controller/AssetControllerBase.php \Drupal\system\Controller\AssetControllerBase::__construct()

Constructs an object derived from AssetControllerBase.

Parameters

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

\Drupal\Core\Asset\LibraryDependencyResolverInterface $libraryDependencyResolver: The library dependency resolver.

\Drupal\Core\Asset\AssetResolverInterface $assetResolver: The asset resolver.

\Drupal\Core\Theme\ThemeInitializationInterface $themeInitialization: The theme initializer.

\Drupal\Core\Theme\ThemeManagerInterface $themeManager: The theme manager.

\Drupal\Core\Asset\AssetCollectionGrouperInterface $grouper: The asset grouper.

\Drupal\Core\Asset\AssetCollectionOptimizerInterface $optimizer: The asset collection optimizer.

\Drupal\Core\Asset\AssetDumperUriInterface $dumper: The asset dumper.

Overrides FileDownloadController::__construct

File

core/modules/system/src/Controller/AssetControllerBase.php, line 86

Class

AssetControllerBase
Defines a controller to serve asset aggregates.

Namespace

Drupal\system\Controller

Code

public function __construct(StreamWrapperManagerInterface $streamWrapperManager, protected readonly LibraryDependencyResolverInterface $libraryDependencyResolver, protected readonly AssetResolverInterface $assetResolver, protected readonly ThemeInitializationInterface $themeInitialization, protected readonly ThemeManagerInterface $themeManager, protected readonly AssetCollectionGrouperInterface $grouper, protected readonly AssetCollectionOptimizerInterface $optimizer, protected readonly AssetDumperUriInterface $dumper) {
  parent::__construct($streamWrapperManager);
  $this->fileExtension = $this->assetType;
}

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