diff --git a/core/lib/Drupal/Core/Entity/EntityType.php b/core/lib/Drupal/Core/Entity/EntityType.php index 491437f..fa1c6d0 100644 --- a/core/lib/Drupal/Core/Entity/EntityType.php +++ b/core/lib/Drupal/Core/Entity/EntityType.php @@ -14,6 +14,11 @@ */ class EntityType implements EntityTypeInterface { + /* + * Defines EntityChangedInterface constant for internal usage + */ + const ENTITY_TYPE_ENTITY_CHANGED_INTERFACE = 'Drupal\Core\Entity\EntityChangedInterface'; + use StringTranslationTrait; /** @@ -301,7 +306,7 @@ public function __construct($definition) { // Automatically add the EntityChanged constraint if the entity type tracks // the changed time. - if (is_subclass_of($this->getClass(), 'Drupal\Core\Entity\EntityChangedInterface')) { + if (is_subclass_of($this->getClass(), self::ENTITY_TYPE_ENTITY_CHANGED_INTERFACE)) { $this->addConstraint('EntityChanged'); } diff --git a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php index e991105..7011f28 100644 --- a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php @@ -360,7 +360,7 @@ public function setAccessClass($class); * @return bool * TRUE if the entity type is a subclass of the class or interface. * - * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 8.0.0 + * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0 */ public function isSubclassOf($class);