function ModerationInformation::getWorkflowForEntity

Same name in other branches
  1. 9 core/modules/content_moderation/src/ModerationInformation.php \Drupal\content_moderation\ModerationInformation::getWorkflowForEntity()
  2. 8.9.x core/modules/content_moderation/src/ModerationInformation.php \Drupal\content_moderation\ModerationInformation::getWorkflowForEntity()
  3. 10 core/modules/content_moderation/src/ModerationInformation.php \Drupal\content_moderation\ModerationInformation::getWorkflowForEntity()
2 calls to ModerationInformation::getWorkflowForEntity()
ModerationInformation::isDefaultRevisionPublished in core/modules/content_moderation/src/ModerationInformation.php
ModerationInformation::isLiveRevision in core/modules/content_moderation/src/ModerationInformation.php

File

core/modules/content_moderation/src/ModerationInformation.php, line 184

Class

ModerationInformation
General service for moderation-related questions about Entity API.

Namespace

Drupal\content_moderation

Code

public function getWorkflowForEntity(ContentEntityInterface $entity) {
    return $this->getWorkflowForEntityTypeAndBundle($entity->getEntityTypeId(), $entity->bundle());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.