function SqlContentEntityStorage::__construct
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::__construct()
- 8.9.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::__construct()
- 10 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::__construct()
Constructs a SqlContentEntityStorage object.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.
\Drupal\Core\Database\Connection $database: The database connection to be used.
\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.
\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend to be used.
\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.
\Drupal\Core\Cache\MemoryCache\MemoryCacheInterface $memory_cache: The memory cache backend to be used.
\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle info.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
Overrides ContentEntityStorageBase::__construct
1 method overrides SqlContentEntityStorage::__construct()
- CommentStorage::__construct in core/
modules/ comment/ src/ CommentStorage.php - Constructs a CommentStorage object.
File
-
core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorage.php, line 180
Class
- SqlContentEntityStorage
- A content entity database storage implementation.
Namespace
Drupal\Core\Entity\SqlCode
public function __construct(EntityTypeInterface $entity_type, Connection $database, EntityFieldManagerInterface $entity_field_manager, CacheBackendInterface $cache, LanguageManagerInterface $language_manager, MemoryCacheInterface $memory_cache, EntityTypeBundleInfoInterface $entity_type_bundle_info, EntityTypeManagerInterface $entity_type_manager) {
parent::__construct($entity_type, $entity_field_manager, $cache, $memory_cache, $entity_type_bundle_info);
$this->database = $database;
$this->languageManager = $language_manager;
$this->entityTypeManager = $entity_type_manager;
$this->entityType = $this->entityTypeManager
->getActiveDefinition($entity_type->id());
$this->fieldStorageDefinitions = $this->entityFieldManager
->getActiveFieldStorageDefinitions($entity_type->id());
$this->initTableLayout();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.