diff --git a/core/lib/Drupal/Core/Entity/EntityType.php b/core/lib/Drupal/Core/Entity/EntityType.php index 60f3315..09767fb 100644 --- a/core/lib/Drupal/Core/Entity/EntityType.php +++ b/core/lib/Drupal/Core/Entity/EntityType.php @@ -13,7 +13,7 @@ * @ingroup entity_api */ class EntityType implements EntityTypeInterface { - + use StringTranslationTrait; /** diff --git a/core/lib/Drupal/Core/Field/FieldModuleUninstallValidator.php b/core/lib/Drupal/Core/Field/FieldModuleUninstallValidator.php index 05300f1..d1adaa9 100644 --- a/core/lib/Drupal/Core/Field/FieldModuleUninstallValidator.php +++ b/core/lib/Drupal/Core/Field/FieldModuleUninstallValidator.php @@ -2,7 +2,6 @@ namespace Drupal\Core\Field; -use Drupal\Core\Entity\ContentEntityTypeInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\FieldableEntityStorageInterface; use Drupal\Core\Extension\ModuleUninstallValidatorInterface; diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php index 22d6e08..e8832f3 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php @@ -4,7 +4,6 @@ use Drupal\Component\Utility\Html; use Drupal\Component\Utility\NestedArray; -use Drupal\Core\Entity\ContentEntityTypeInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\TypedData\EntityDataDefinition; diff --git a/core/modules/comment/comment.views.inc b/core/modules/comment/comment.views.inc index 6e68c7f..4e598ee 100644 --- a/core/modules/comment/comment.views.inc +++ b/core/modules/comment/comment.views.inc @@ -22,7 +22,7 @@ function comment_views_data_alter(&$data) { // Provide a integration for each entity type with fields except comment. foreach (\Drupal::entityManager()->getDefinitions() as $entity_type_id => $entity_type) { - if ($entity_type_id == 'comment' || !$entity_type->getBaseTable()) { + if ($entity_type_id == 'comment' || !$entity_type->isSubclassOf('\Drupal\Core\Entity\ContentEntityInterface') || !$entity_type->getBaseTable()) { continue; } diff --git a/core/modules/comment/src/CommentManager.php b/core/modules/comment/src/CommentManager.php index 49aef42..8fdeb4e 100644 --- a/core/modules/comment/src/CommentManager.php +++ b/core/modules/comment/src/CommentManager.php @@ -100,7 +100,7 @@ public function __construct(EntityManagerInterface $entity_manager, QueryFactory */ public function getFields($entity_type_id) { $entity_type = $this->entityManager->getDefinition($entity_type_id); - if (!$entity_type->isSubclassOf('\Drupal\Core\Entity\FieldableEntityInterface')) { + if (!$entity_type instanceof ContentEntityTypeInterface) { // Early return, only content types can carry comment fields. return array(); }