function BlockContentWorkspaceHandler::isEntitySupported

Same name in other branches
  1. 11.x core/modules/workspaces/src/Entity/Handler/BlockContentWorkspaceHandler.php \Drupal\workspaces\Entity\Handler\BlockContentWorkspaceHandler::isEntitySupported()

Overrides DefaultWorkspaceHandler::isEntitySupported

File

core/modules/workspaces/src/Entity/Handler/BlockContentWorkspaceHandler.php, line 17

Class

BlockContentWorkspaceHandler
Provides a custom workspace handler for block_content entities.

Namespace

Drupal\workspaces\Entity\Handler

Code

public function isEntitySupported(EntityInterface $entity) : bool {
    // Only reusable blocks can be tracked individually. Non-reusable or inline
    // blocks are tracked as part of the entity they are a composite of.
    
    /** @var \Drupal\block_content\BlockContentInterface $entity */
    return $entity->isReusable();
}

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