You are here

public function CommentStorage::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/comment/src/CommentStorage.php \Drupal\comment\CommentStorage::__construct()
  2. 9 core/modules/comment/src/CommentStorage.php \Drupal\comment\CommentStorage::__construct()

Constructs a CommentStorage object.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_info: An array of entity info for the entity type.

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

\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

\Drupal\Core\Cache\CacheBackendInterface $cache: Cache backend instance to use.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

\Drupal\Core\Cache\MemoryCache\MemoryCacheInterface $memory_cache: The memory cache.

\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 SqlContentEntityStorage::__construct

File

core/modules/comment/src/CommentStorage.php, line 57

Class

CommentStorage
Defines the storage handler class for comments.

Namespace

Drupal\comment

Code

public function __construct(EntityTypeInterface $entity_info, Connection $database, EntityFieldManagerInterface $entity_field_manager, AccountInterface $current_user, CacheBackendInterface $cache, LanguageManagerInterface $language_manager, MemoryCacheInterface $memory_cache, EntityTypeBundleInfoInterface $entity_type_bundle_info, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct($entity_info, $database, $entity_field_manager, $cache, $language_manager, $memory_cache, $entity_type_bundle_info, $entity_type_manager);
  $this->currentUser = $current_user;
}