function DefaultWorkspaceHandler::isEntitySupported

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

Determines if an entity should be tracked in a workspace.

At the general level, workspace support is determined for the entire entity type. If an entity type is supported, there may be further decisions each entity type can make to evaluate if a given entity is appropriate to be tracked in a workspace.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity we may be tracking.

Return value

bool TRUE if this entity should be tracked in a workspace, FALSE otherwise.

Overrides WorkspaceHandlerInterface::isEntitySupported

2 methods override DefaultWorkspaceHandler::isEntitySupported()
BlockContentWorkspaceHandler::isEntitySupported in core/modules/workspaces/src/Entity/Handler/BlockContentWorkspaceHandler.php
Determines if an entity should be tracked in a workspace.
EntityTestRevPubWorkspaceHandler::isEntitySupported in core/modules/workspaces/tests/modules/workspaces_test/src/EntityTestRevPubWorkspaceHandler.php
Determines if an entity should be tracked in a workspace.

File

core/modules/workspaces/src/Entity/Handler/DefaultWorkspaceHandler.php, line 27

Class

DefaultWorkspaceHandler
Common customizations for most entity types.

Namespace

Drupal\workspaces\Entity\Handler

Code

public function isEntitySupported(EntityInterface $entity) : bool {
    return TRUE;
}

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