ModerationInformation::canModerateEntitiesOfEntityType

public ModerationInformation::canModerateEntitiesOfEntityType(EntityTypeInterface $entity_type)

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

File

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

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');
}
doc_Drupal
2016-10-29 09:28:33
Comments
Leave a Comment

Please login to continue.