You are here

public function ModerationInformation::canModerateEntitiesOfEntityType in Drupal 8

Same name and namespace in other branches
  1. 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_moderation

Code

public function canModerateEntitiesOfEntityType(EntityTypeInterface $entity_type) {
  return $entity_type
    ->hasHandlerClass('moderation');
}