class TestWorkspaceNegotiator

Same name and namespace in other branches
  1. 11.x core/modules/workspaces/tests/modules/workspace_update_test/src/Negotiator/TestWorkspaceNegotiator.php \Drupal\workspace_update_test\Negotiator\TestWorkspaceNegotiator
  2. 10 core/modules/workspaces/tests/modules/workspace_update_test/src/Negotiator/TestWorkspaceNegotiator.php \Drupal\workspace_update_test\Negotiator\TestWorkspaceNegotiator
  3. 9 core/modules/workspaces/tests/modules/workspace_update_test/src/Negotiator/TestWorkspaceNegotiator.php \Drupal\workspace_update_test\Negotiator\TestWorkspaceNegotiator
  4. 8.9.x core/modules/workspaces/tests/modules/workspace_update_test/src/Negotiator/TestWorkspaceNegotiator.php \Drupal\workspace_update_test\Negotiator\TestWorkspaceNegotiator

Defines a workspace negotiator used for testing.

Hierarchy

Expanded class hierarchy of TestWorkspaceNegotiator

1 string reference to 'TestWorkspaceNegotiator'
workspace_update_test.services.yml in core/modules/workspaces/tests/modules/workspace_update_test/workspace_update_test.services.yml
core/modules/workspaces/tests/modules/workspace_update_test/workspace_update_test.services.yml
1 service uses TestWorkspaceNegotiator
workspace_update_test.negotiator.test in core/modules/workspaces/tests/modules/workspace_update_test/workspace_update_test.services.yml
Drupal\workspace_update_test\Negotiator\TestWorkspaceNegotiator

File

core/modules/workspaces/tests/modules/workspace_update_test/src/Negotiator/TestWorkspaceNegotiator.php, line 15

Namespace

Drupal\workspace_update_test\Negotiator
View source
class TestWorkspaceNegotiator implements WorkspaceNegotiatorInterface, WorkspaceIdNegotiatorInterface {
  
  /**
   * {@inheritdoc}
   */
  public function applies(Request $request) {
    return TRUE;
  }
  
  /**
   * {@inheritdoc}
   */
  public function getActiveWorkspaceId(Request $request) : ?string {
    return 'test';
  }
  
  /**
   * {@inheritdoc}
   */
  public function setActiveWorkspace(WorkspaceInterface $workspace) : void {
    // Nothing to do here.
  }
  
  /**
   * {@inheritdoc}
   */
  public function unsetActiveWorkspace() : void {
    // Nothing to do here.
  }

}

Members


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