public function BackgroundImage::getCssUri in Background Image 8
Same name and namespace in other branches
- 2.x src/Entity/BackgroundImage.php \Drupal\background_image\Entity\BackgroundImage::getCssUri()
- 2.0.x src/Entity/BackgroundImage.php \Drupal\background_image\Entity\BackgroundImage::getCssUri()
Retrieves the CSS file this background image.
Return value
string An internal scheme path to the CSS file.
Overrides BackgroundImageInterface::getCssUri
File
- src/
Entity/ BackgroundImage.php, line 315
Class
- BackgroundImage
- Defines the Background Image entity.
Namespace
Drupal\background_image\EntityCode
public function getCssUri() {
$default_scheme = file_default_scheme();
$min = $this
->getBackgroundImageManager()
->useMinifiedCssUri() ? '.min' : '';
return "{$default_scheme}://background_image/css/{$this->id()}/{$default_scheme}/{$this->getImageHash()}{$min}.css";
}