From dec55132d47a5b9d1bc74d5daae0c3cbb1c14445 Mon Sep 17 00:00:00 2001
From: Lee Rowlands <lee.rowlands@previousnext.com.au>
Date: Tue, 20 Aug 2019 12:05:43 +1000
Subject: [PATCH] Issue #2897483 by plach, Sam152, amateescu: Use injected
 entity type manager in ModerationInformation

---
 core/modules/content_moderation/src/ModerationInformation.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/modules/content_moderation/src/ModerationInformation.php b/core/modules/content_moderation/src/ModerationInformation.php
index 539649bc797a..1d3fb0ad104c 100644
--- a/core/modules/content_moderation/src/ModerationInformation.php
+++ b/core/modules/content_moderation/src/ModerationInformation.php
@@ -182,7 +182,7 @@ public function isLiveRevision(ContentEntityInterface $entity) {
    */
   public function isDefaultRevisionPublished(ContentEntityInterface $entity) {
     $workflow = $this->getWorkflowForEntity($entity);
-    $default_revision = \Drupal::entityTypeManager()->getStorage($entity->getEntityTypeId())->load($entity->id());
+    $default_revision = $this->entityTypeManager->getStorage($entity->getEntityTypeId())->load($entity->id());
     // If no default revision could be loaded, the entity has not yet been
     // saved. In this case the moderation_state of the unsaved entity can be
     // used, since once saved it will become the default.
-- 
GitLab