You are here

public function SqlContentEntityStorageSchema::__construct in Zircon Profile 8

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

Constructs a SqlContentEntityStorageSchema.

Parameters

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

\Drupal\Core\Entity\ContentEntityTypeInterface $entity_type: The entity type.

\Drupal\Core\Entity\Sql\SqlContentEntityStorage $storage: The storage of the entity type. This must be an SQL-based storage.

\Drupal\Core\Database\Connection $database: The database connection to be used.

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php, line 104
Contains \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema.

Class

SqlContentEntityStorageSchema
Defines a schema handler that supports revisionable, translatable entities.

Namespace

Drupal\Core\Entity\Sql

Code

public function __construct(EntityManagerInterface $entity_manager, ContentEntityTypeInterface $entity_type, SqlContentEntityStorage $storage, Connection $database) {
  $this->entityManager = $entity_manager;
  $this->entityType = $entity_type;
  $this->fieldStorageDefinitions = $entity_manager
    ->getFieldStorageDefinitions($entity_type
    ->id());
  $this->storage = $storage;
  $this->database = $database;
}