class BlockContentWorkspaceHandler
Same name in other branches
- 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
- class \Drupal\workspaces\Entity\Handler\DefaultWorkspaceHandler implements \Drupal\workspaces\Entity\Handler\WorkspaceHandlerInterface, \Drupal\Core\Entity\EntityHandlerInterface
- class \Drupal\workspaces\Entity\Handler\BlockContentWorkspaceHandler extends \Drupal\workspaces\Entity\Handler\DefaultWorkspaceHandler
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\HandlerView 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
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
BlockContentWorkspaceHandler::isEntitySupported | public | function | Determines if an entity should be tracked in a workspace. | Overrides DefaultWorkspaceHandler::isEntitySupported |
DefaultWorkspaceHandler::createInstance | public static | function | Instantiates a new instance of this entity handler. | Overrides EntityHandlerInterface::createInstance |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.