You are here

public function EntityStorageBase::__construct in Zircon Profile 8

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

Constructs an EntityStorageBase instance.

Parameters

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

3 calls to EntityStorageBase::__construct()
ConfigEntityStorage::__construct in core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
Constructs a ConfigEntityStorage object.
ContentEntityStorageBase::__construct in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Constructs a ContentEntityStorageBase object.
KeyValueEntityStorage::__construct in core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php
Constructs a new KeyValueEntityStorage.
3 methods override EntityStorageBase::__construct()
ConfigEntityStorage::__construct in core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
Constructs a ConfigEntityStorage object.
ContentEntityStorageBase::__construct in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Constructs a ContentEntityStorageBase object.
KeyValueEntityStorage::__construct in core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php
Constructs a new KeyValueEntityStorage.

File

core/lib/Drupal/Core/Entity/EntityStorageBase.php, line 86
Contains \Drupal\Core\Entity\EntityStorageBase.

Class

EntityStorageBase
A base entity storage class.

Namespace

Drupal\Core\Entity

Code

public function __construct(EntityTypeInterface $entity_type) {
  $this->entityTypeId = $entity_type
    ->id();
  $this->entityType = $entity_type;
  $this->idKey = $this->entityType
    ->getKey('id');
  $this->uuidKey = $this->entityType
    ->getKey('uuid');
  $this->langcodeKey = $this->entityType
    ->getKey('langcode');
  $this->entityClass = $this->entityType
    ->getClass();
}