class EntityTestRevPubWorkspaceHandler

Same name in other branches
  1. 11.x core/modules/workspaces/tests/modules/workspaces_test/src/EntityTestRevPubWorkspaceHandler.php \Drupal\workspaces_test\EntityTestRevPubWorkspaceHandler

Provides a custom workspace handler for testing purposes.

Hierarchy

Expanded class hierarchy of EntityTestRevPubWorkspaceHandler

1 file declares its use of EntityTestRevPubWorkspaceHandler
WorkspaceInformationTest.php in core/modules/workspaces/tests/src/Kernel/WorkspaceInformationTest.php

File

core/modules/workspaces/tests/modules/workspaces_test/src/EntityTestRevPubWorkspaceHandler.php, line 11

Namespace

Drupal\workspaces_test
View source
class EntityTestRevPubWorkspaceHandler extends DefaultWorkspaceHandler {
    
    /**
     * {@inheritdoc}
     */
    public function isEntitySupported(EntityInterface $entity) : bool {
        return $entity->bundle() !== 'ignored_bundle';
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
DefaultWorkspaceHandler::createInstance public static function Instantiates a new instance of this entity handler. Overrides EntityHandlerInterface::createInstance
EntityTestRevPubWorkspaceHandler::isEntitySupported public function Determines if an entity should be tracked in a workspace. Overrides DefaultWorkspaceHandler::isEntitySupported

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