function QueryParameterWorkspaceNegotiator::getQueryOptions

Same name and namespace in other branches
  1. main core/modules/workspaces/src/Negotiator/QueryParameterWorkspaceNegotiator.php \Drupal\workspaces\Negotiator\QueryParameterWorkspaceNegotiator::getQueryOptions()

Returns the query options used by this negotiator.

Parameters

string $workspace_id: A workspace ID.

Return value

array An array of query options that can be used for a \Drupal\Core\Url object.

File

core/modules/workspaces/src/Negotiator/QueryParameterWorkspaceNegotiator.php, line 73

Class

QueryParameterWorkspaceNegotiator
Defines the query parameter workspace negotiator.

Namespace

Drupal\workspaces\Negotiator

Code

public function getQueryOptions(string $workspace_id) : array {
  return [
    'workspace' => $workspace_id,
    'token' => $this->getQueryToken($workspace_id),
  ];
}

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