You are here

public function ContentEntityStorageBase::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::__construct()

Constructs a ContentEntityStorageBase object.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.

\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager.

\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend to be used.

Overrides EntityStorageBase::__construct

1 call to ContentEntityStorageBase::__construct()
SqlContentEntityStorage::__construct in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
Constructs a SqlContentEntityStorage object.
1 method overrides ContentEntityStorageBase::__construct()
SqlContentEntityStorage::__construct in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
Constructs a SqlContentEntityStorage object.

File

core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php, line 52
Contains \Drupal\Core\Entity\ContentEntityStorageBase.

Class

ContentEntityStorageBase
Base class for content entity storage handlers.

Namespace

Drupal\Core\Entity

Code

public function __construct(EntityTypeInterface $entity_type, EntityManagerInterface $entity_manager, CacheBackendInterface $cache) {
  parent::__construct($entity_type);
  $this->bundleKey = $this->entityType
    ->getKey('bundle');
  $this->entityManager = $entity_manager;
  $this->cacheBackend = $cache;
}