You are here

protected function BackgroundImage::getContainer in Background Image 8

Same name and namespace in other branches
  1. 2.x src/Entity/BackgroundImage.php \Drupal\background_image\Entity\BackgroundImage::getContainer()
  2. 2.0.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 288

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;
}