You are here

protected function BackgroundImage::getContainer in Background Image 2.0.x

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

Retrieves the Container.

Return value

\Symfony\Component\DependencyInjection\ContainerInterface

File

src/Entity/BackgroundImage.php, line 289

Class

BackgroundImage
Defines the Background Image entity.

Namespace

Drupal\background_image\Entity

Code

protected function getContainer() {
  if (!isset($this->container)) {
    $this
      ->setContainer(\Drupal::getContainer());
  }
  return $this->container;
}