You are here

public function BackgroundImage::getCssClass in Background Image 8

Same name and namespace in other branches
  1. 2.x src/Entity/BackgroundImage.php \Drupal\background_image\Entity\BackgroundImage::getCssClass()
  2. 2.0.x src/Entity/BackgroundImage.php \Drupal\background_image\Entity\BackgroundImage::getCssClass()

Return value

string

Overrides BackgroundImageInterface::getCssClass

File

src/Entity/BackgroundImage.php, line 305

Class

BackgroundImage
Defines the Background Image entity.

Namespace

Drupal\background_image\Entity

Code

public function getCssClass() {
  if (!isset($this->cssSelector)) {
    $this->cssSelector = $this
      ->getBackgroundImageManager()
      ->getBaseClass() . '--' . Html::cleanCssIdentifier($this
      ->getImageHash());
  }
  return $this->cssSelector;
}