public function BackgroundImageManager::getResponsiveImageStyle in Background Image 8
Same name and namespace in other branches
- 2.x src/BackgroundImageManager.php \Drupal\background_image\BackgroundImageManager::getResponsiveImageStyle()
- 2.0.x src/BackgroundImageManager.php \Drupal\background_image\BackgroundImageManager::getResponsiveImageStyle()
Retrieves the responsive image style, if one exists.
Return value
\Drupal\responsive_image\ResponsiveImageStyleInterface|null
Overrides BackgroundImageManagerInterface::getResponsiveImageStyle
1 call to BackgroundImageManager::getResponsiveImageStyle()
- BackgroundImageManager::getFallbackImageStyle in src/
BackgroundImageManager.php - Retrieves the fallback image style.
File
- src/
BackgroundImageManager.php, line 608
Class
Namespace
Drupal\background_imageCode
public function getResponsiveImageStyle() {
if (!isset($this->responsiveImageStyle)) {
$this->responsiveImageStyle = $this->moduleHandler
->moduleExists('responsive_image') ? $this->entityTypeManager
->getStorage('responsive_image_style')
->load($this->config
->get('image_style.responsive') ?: 'background_image') : NULL;
}
return $this->responsiveImageStyle;
}