diff -u b/core/lib/Drupal/Core/Entity/EntityType.php b/core/lib/Drupal/Core/Entity/EntityType.php --- b/core/lib/Drupal/Core/Entity/EntityType.php +++ b/core/lib/Drupal/Core/Entity/EntityType.php @@ -19,11 +19,4 @@ /** - * Indicates whether the entity definition should be internal. - * - * @var bool - */ - protected $internal = FALSE; - - /** * Indicates whether entities should be statically cached. * @@ -163,4 +156,11 @@ /** + * Indicates whether the entity data is internal. + * + * @var bool + */ + protected $internal = FALSE; + + /** * Indicates whether entities of this type have multilingual support. * diff -u b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php --- b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php @@ -118,14 +118,4 @@ /** - * Indicates whether the entity definition should be internal. - * - * @return bool - * TRUE if the entity definition should be internal. - * - * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal() - */ - public function isInternal(); - - /** * Indicates whether entities should be statically cached. * @@ -574,4 +564,22 @@ /** + * Indicates whether the entity data is internal. + * + * This can be used in a scenario when it is not desirable to expose data of + * this entity type to an external system. + * + * The implications of this method are left to the discretion of the caller. + * For example, a module providing an HTTP API may not expose entities of + * this type or a custom entity reference field settings form may deprioritize + * entities of this type in a select list. + * + * @return bool + * TRUE if the entity data is internal. FALSE otherwise. + * + * @see \Drupal\Core\TypedData\DataDefinitionInterface::isInternal() + */ + public function isInternal(); + + /** * Indicates whether entities of this type have multilingual support. * diff -u b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php --- b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php @@ -162,7 +162,7 @@ } /** - * Provides cases for testEntityDefinitionIsInternal. + * Provides test cases for testEntityDefinitionIsInternal. */ public function entityDefinitionIsInternalProvider() { return [