Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/comment/src/CommentStorage.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
3 namespace Drupal\comment; | 3 namespace Drupal\comment; |
4 | 4 |
5 use Drupal\Core\Cache\CacheBackendInterface; | 5 use Drupal\Core\Cache\CacheBackendInterface; |
6 use Drupal\Core\Cache\MemoryCache\MemoryCacheInterface; | 6 use Drupal\Core\Cache\MemoryCache\MemoryCacheInterface; |
7 use Drupal\Core\Database\Connection; | 7 use Drupal\Core\Database\Connection; |
8 use Drupal\Core\Entity\EntityManagerInterface; | 8 use Drupal\Core\Entity\EntityFieldManagerInterface; |
9 use Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface; | |
10 use Drupal\Core\Entity\EntityTypeBundleInfoInterface; | |
9 use Drupal\Core\Entity\EntityTypeInterface; | 11 use Drupal\Core\Entity\EntityTypeInterface; |
10 use Drupal\Core\Entity\EntityInterface; | 12 use Drupal\Core\Entity\EntityInterface; |
13 use Drupal\Core\Entity\EntityTypeManagerInterface; | |
11 use Drupal\Core\Entity\FieldableEntityInterface; | 14 use Drupal\Core\Entity\FieldableEntityInterface; |
12 use Drupal\Core\Entity\Sql\SqlContentEntityStorage; | 15 use Drupal\Core\Entity\Sql\SqlContentEntityStorage; |
13 use Drupal\Core\Session\AccountInterface; | 16 use Drupal\Core\Session\AccountInterface; |
14 use Drupal\Core\Language\LanguageManagerInterface; | 17 use Drupal\Core\Language\LanguageManagerInterface; |
15 use Symfony\Component\DependencyInjection\ContainerInterface; | 18 use Symfony\Component\DependencyInjection\ContainerInterface; |
34 * | 37 * |
35 * @param \Drupal\Core\Entity\EntityTypeInterface $entity_info | 38 * @param \Drupal\Core\Entity\EntityTypeInterface $entity_info |
36 * An array of entity info for the entity type. | 39 * An array of entity info for the entity type. |
37 * @param \Drupal\Core\Database\Connection $database | 40 * @param \Drupal\Core\Database\Connection $database |
38 * The database connection to be used. | 41 * The database connection to be used. |
39 * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager | 42 * @param \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager |
40 * The entity manager. | 43 * The entity field manager. |
41 * @param \Drupal\Core\Session\AccountInterface $current_user | 44 * @param \Drupal\Core\Session\AccountInterface $current_user |
42 * The current user. | 45 * The current user. |
43 * @param \Drupal\Core\Cache\CacheBackendInterface $cache | 46 * @param \Drupal\Core\Cache\CacheBackendInterface $cache |
44 * Cache backend instance to use. | 47 * Cache backend instance to use. |
45 * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager | 48 * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager |
46 * The language manager. | 49 * The language manager. |
47 * @param \Drupal\Core\Cache\MemoryCache\MemoryCacheInterface $memory_cache | 50 * @param \Drupal\Core\Cache\MemoryCache\MemoryCacheInterface $memory_cache |
48 * The memory cache. | 51 * The memory cache.* |
49 */ | 52 * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info |
50 public function __construct(EntityTypeInterface $entity_info, Connection $database, EntityManagerInterface $entity_manager, AccountInterface $current_user, CacheBackendInterface $cache, LanguageManagerInterface $language_manager, MemoryCacheInterface $memory_cache) { | 53 * The entity type bundle info. |
51 parent::__construct($entity_info, $database, $entity_manager, $cache, $language_manager, $memory_cache); | 54 * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager |
55 * The entity type manager. | |
56 * @param \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository | |
57 * The entity last installed schema repository. | |
58 */ | |
59 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, EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository = NULL) { | |
60 parent::__construct($entity_info, $database, $entity_field_manager, $cache, $language_manager, $memory_cache, $entity_type_bundle_info, $entity_type_manager, $entity_last_installed_schema_repository); | |
52 $this->currentUser = $current_user; | 61 $this->currentUser = $current_user; |
53 } | 62 } |
54 | 63 |
55 /** | 64 /** |
56 * {@inheritdoc} | 65 * {@inheritdoc} |
57 */ | 66 */ |
58 public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_info) { | 67 public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_info) { |
59 return new static( | 68 return new static( |
60 $entity_info, | 69 $entity_info, |
61 $container->get('database'), | 70 $container->get('database'), |
62 $container->get('entity.manager'), | 71 $container->get('entity_field.manager'), |
63 $container->get('current_user'), | 72 $container->get('current_user'), |
64 $container->get('cache.entity'), | 73 $container->get('cache.entity'), |
65 $container->get('language_manager'), | 74 $container->get('language_manager'), |
66 $container->get('entity.memory_cache') | 75 $container->get('entity.memory_cache'), |
76 $container->get('entity_type.bundle.info'), | |
77 $container->get('entity_type.manager'), | |
78 $container->get('entity.last_installed_schema.repository') | |
67 ); | 79 ); |
68 } | 80 } |
69 | 81 |
70 /** | 82 /** |
71 * {@inheritdoc} | 83 * {@inheritdoc} |