function CommentStorage::__construct
Same name in other branches
- 9 core/modules/comment/src/CommentStorage.php \Drupal\comment\CommentStorage::__construct()
- 10 core/modules/comment/src/CommentStorage.php \Drupal\comment\CommentStorage::__construct()
- 11.x 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 56
Class
- CommentStorage
- Defines the storage handler class for comments.
Namespace
Drupal\commentCode
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 = NULL, EntityTypeManagerInterface $entity_type_manager = NULL) {
parent::__construct($entity_info, $database, $entity_field_manager, $cache, $language_manager, $memory_cache, $entity_type_bundle_info, $entity_type_manager);
$this->currentUser = $current_user;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.