You are here

protected function BackgroundImage::getEntityRepository in Background Image 8

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

Retrieves the Entity Repository service.

Return value

\Drupal\Core\Entity\EntityRepositoryInterface|mixed

File

src/Entity/BackgroundImage.php, line 326

Class

BackgroundImage
Defines the Background Image entity.

Namespace

Drupal\background_image\Entity

Code

protected function getEntityRepository() {
  if (!isset($this->entityRepository)) {
    $this->entityRepository = $this
      ->getContainer()
      ->get('entity.repository');
  }
  return $this->entityRepository;
}