public function entity_moderation_status(EntityInterface $entity) {
    $moderation_module = $this->active_moderation_module();
    if ($this->moduleHandler->moduleExists($moderation_module)) {
      $moderation_info = \Drupal::service($moderation_module . '.moderation_information');
      // Check that entity bundle support moderation.
      if ($moderation_info->getWorkflowForEntity($entity)) {
        // Contains checking:
        // isLatestRevision, isDefaultRevision, isPublishedState.
        return $moderation_info->isLiveRevision($entity);
      }
    }

    // Fallback to is isPublished & isDefaultRevision.
    return ($entity->isPublished() && $entity->isDefaultRevision());
  }