You are here

public function ModerationInformationInterface::isBundleForModeratableEntity in Workbench Moderation 8

Same name and namespace in other branches
  1. 8.2 src/ModerationInformationInterface.php \Drupal\workbench_moderation\ModerationInformationInterface::isBundleForModeratableEntity()

Determines if config entity is a bundle for entities that may be moderated.

This is the same check as exists in selectRevisionableEntityTypes(), but that one cannot use the entity manager due to recursion and this one doesn't have the entity list otherwise so must use the entity manager. The alternative would be to call getDefinitions() on entityTypeManager and use that in a sub-call, but that would be unnecessarily memory intensive.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to check.

Return value

bool TRUE if we want to add a Moderation operation to this entity, FALSE otherwise.

1 method overrides ModerationInformationInterface::isBundleForModeratableEntity()
ModerationInformation::isBundleForModeratableEntity in src/ModerationInformation.php
Determines if config entity is a bundle for entities that may be moderated.

File

src/ModerationInformationInterface.php, line 103

Class

ModerationInformationInterface
Interface for moderation_information service.

Namespace

Drupal\workbench_moderation

Code

public function isBundleForModeratableEntity(EntityInterface $entity);