You are here

public function ModerationInformation::getWorkflowForEntity in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/content_moderation/src/ModerationInformation.php \Drupal\content_moderation\ModerationInformation::getWorkflowForEntity()
  2. 9 core/modules/content_moderation/src/ModerationInformation.php \Drupal\content_moderation\ModerationInformation::getWorkflowForEntity()

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());
}