function ModerationInformation::isModeratedEntityType

Same name in other branches
  1. 9 core/modules/content_moderation/src/ModerationInformation.php \Drupal\content_moderation\ModerationInformation::isModeratedEntityType()
  2. 10 core/modules/content_moderation/src/ModerationInformation.php \Drupal\content_moderation\ModerationInformation::isModeratedEntityType()
  3. 11.x core/modules/content_moderation/src/ModerationInformation.php \Drupal\content_moderation\ModerationInformation::isModeratedEntityType()

Overrides ModerationInformationInterface::isModeratedEntityType

File

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

Class

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

Namespace

Drupal\content_moderation

Code

public function isModeratedEntityType(EntityTypeInterface $entity_type) {
    $bundles = $this->bundleInfo
        ->getBundleInfo($entity_type->id());
    return !empty(array_column($bundles, 'workflow'));
}

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