public function ModerationInformation::canModerateEntitiesOfEntityType in Drupal 8
Same name and namespace in other branches
- 9 core/modules/content_moderation/src/ModerationInformation.php \Drupal\content_moderation\ModerationInformation::canModerateEntitiesOfEntityType()
Determines if an entity type can have moderated entities.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: An entity type object.
Return value
bool TRUE if this entity type can have moderated entities, FALSE otherwise.
Overrides ModerationInformationInterface::canModerateEntitiesOfEntityType
1 call to ModerationInformation::canModerateEntitiesOfEntityType()
- ModerationInformation::shouldModerateEntitiesOfBundle in core/
modules/ content_moderation/ src/ ModerationInformation.php - Determines if an entity type/bundle entities should be moderated.
File
- core/
modules/ content_moderation/ src/ ModerationInformation.php, line 70
Class
- ModerationInformation
- General service for moderation-related questions about Entity API.
Namespace
Drupal\content_moderationCode
public function canModerateEntitiesOfEntityType(EntityTypeInterface $entity_type) {
return $entity_type
->hasHandlerClass('moderation');
}