function BlockContentModerationHandler::isModeratedEntity

Same name in other branches
  1. 10 core/modules/content_moderation/src/Entity/Handler/BlockContentModerationHandler.php \Drupal\content_moderation\Entity\Handler\BlockContentModerationHandler::isModeratedEntity()
  2. 11.x core/modules/content_moderation/src/Entity/Handler/BlockContentModerationHandler.php \Drupal\content_moderation\Entity\Handler\BlockContentModerationHandler::isModeratedEntity()

Overrides ModerationHandler::isModeratedEntity

File

core/modules/content_moderation/src/Entity/Handler/BlockContentModerationHandler.php, line 36

Class

BlockContentModerationHandler
Customizations for block content entities.

Namespace

Drupal\content_moderation\Entity\Handler

Code

public function isModeratedEntity(ContentEntityInterface $entity) {
    // Only reusable blocks can be moderated individually. Non-reusable or
    // inline blocks are moderated as part of the entity they are a composite
    // of.
    return $entity->isReusable();
}

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