public function EntityStorageControllerBase::__construct

Constructs an EntityStorageControllerBase instance.

Parameters

string $entity_type: The entity type for which the instance is created.

array $entity_info: An array of entity info for the entity type.

2 calls to EntityStorageControllerBase::__construct()
ConfigStorageController::__construct in drupal/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
Constructs a ConfigStorageController object.
DatabaseStorageController::__construct in drupal/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
Constructs a DatabaseStorageController object.
2 methods override EntityStorageControllerBase::__construct()
ConfigStorageController::__construct in drupal/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
Constructs a ConfigStorageController object.
DatabaseStorageController::__construct in drupal/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
Constructs a DatabaseStorageController object.

File

drupal/core/lib/Drupal/Core/Entity/EntityStorageControllerBase.php, line 80
Contains \Drupal\Core\Entity\EntityStorageControllerBase.

Class

EntityStorageControllerBase
A base entity storage controller class.

Namespace

Drupal\Core\Entity

Code

public function __construct($entity_type, $entity_info) {
  $this->entityType = $entity_type;
  $this->entityInfo = $entity_info;

  // Check if the entity type supports static caching of loaded entities.
  $this->cache = !empty($this->entityInfo['static_cache']);
}