class BlockContentWorkspaceHandler

Same name and namespace in other branches
  1. 11.x core/modules/workspaces/src/Entity/Handler/BlockContentWorkspaceHandler.php \Drupal\workspaces\Entity\Handler\BlockContentWorkspaceHandler

Provides a custom workspace handler for block_content entities.

@internal

Hierarchy

Expanded class hierarchy of BlockContentWorkspaceHandler

1 file declares its use of BlockContentWorkspaceHandler
EntityTypeInfo.php in core/modules/workspaces/src/EntityTypeInfo.php

File

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

Namespace

Drupal\workspaces\Entity\Handler
View source
class BlockContentWorkspaceHandler extends DefaultWorkspaceHandler {
  
  /**
   * {@inheritdoc}
   */
  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();
  }

}

Members


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