public function BackgroundImageCssController::__construct in Background Image 8
Same name and namespace in other branches
- 2.x src/Controller/BackgroundImageCssController.php \Drupal\background_image\Controller\BackgroundImageCssController::__construct()
- 2.0.x src/Controller/BackgroundImageCssController.php \Drupal\background_image\Controller\BackgroundImageCssController::__construct()
Constructs a BackgroundImageCssController object.
Parameters
\Drupal\background_image\BackgroundImageManagerInterface $background_image_manager: The Background Image Manager 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 83
Class
- BackgroundImageCssController
- Defines a controller to serve image styles.
Namespace
Drupal\background_image\ControllerCode
public function __construct(BackgroundImageManagerInterface $background_image_manager, ImageFactory $image_factory, LockBackendInterface $lock, ThemeManagerInterface $theme_manager, \Twig_Environment $twig) {
$this->backgroundImageManager = $background_image_manager;
$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');
}
}