EntityTestRevPubWorkspaceHandler.php

Same filename and directory in other branches
  1. 10 core/modules/workspaces/tests/modules/workspaces_test/src/EntityTestRevPubWorkspaceHandler.php

Namespace

Drupal\workspaces_test

File

core/modules/workspaces/tests/modules/workspaces_test/src/EntityTestRevPubWorkspaceHandler.php

View source
<?php

namespace Drupal\workspaces_test;

use Drupal\Core\Entity\EntityInterface;
use Drupal\workspaces\Entity\Handler\DefaultWorkspaceHandler;

/**
 * Provides a custom workspace handler for testing purposes.
 */
class EntityTestRevPubWorkspaceHandler extends DefaultWorkspaceHandler {
    
    /**
     * {@inheritdoc}
     */
    public function isEntitySupported(EntityInterface $entity) : bool {
        return $entity->bundle() !== 'ignored_bundle';
    }

}

Classes

Title Deprecated Summary
EntityTestRevPubWorkspaceHandler Provides a custom workspace handler for testing purposes.

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