You are here

public function BackgroundImageCssController::__construct in Background Image 2.0.x

Same name and namespace in other branches
  1. 8 src/Controller/BackgroundImageCssController.php \Drupal\background_image\Controller\BackgroundImageCssController::__construct()
  2. 2.x src/Controller/BackgroundImageCssController.php \Drupal\background_image\Controller\BackgroundImageCssController::__construct()

Constructs a BackgroundImageCssController object.

Parameters

\Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $streamWrapperManager: The Stream Wrapper Manager service.

\Drupal\background_image\BackgroundImageManagerInterface $background_image_manager: The Background Image Manager service.

\Drupal\Core\File\FileSystemInterface $fileSystem: The File System service.

\Drupal\Core\Image\ImageFactory $image_factory: The Image Factory service.

\Drupal\Core\Lock\LockBackendInterface $lock: The Lock service.

\Drupal\Core\Theme\ThemeManagerInterface $theme_manager: The Theme Manager service.

\Twig_Environment $twig: The Twig service.

Overrides FileDownloadController::__construct

File

src/Controller/BackgroundImageCssController.php, line 104

Class

BackgroundImageCssController
Defines a controller to serve image styles.

Namespace

Drupal\background_image\Controller

Code

public function __construct(StreamWrapperManagerInterface $streamWrapperManager, BackgroundImageManagerInterface $background_image_manager, FileSystemInterface $fileSystem, ImageFactory $image_factory, LockBackendInterface $lock, ThemeManagerInterface $theme_manager, \Twig_Environment $twig) {
  parent::__construct($streamWrapperManager);
  $this->backgroundImageManager = $background_image_manager;
  $this->fileSystem = $fileSystem;
  $this->gzip = extension_loaded('zlib') && \Drupal::config('system.performance')
    ->get('css.gzip');
  $this->imageFactory = $image_factory;
  $this->lock = $lock;
  $this->logger = $this
    ->getLogger('background_image');
  $this->themeManager = $theme_manager;
  $this->twig = $twig;
  if ($this
    ->moduleHandler()
    ->moduleExists('responsive_image')) {
    $this->breakpointManager = \Drupal::service('breakpoint.manager');
  }
}