You are here

public function SessionWorkspaceNegotiator::applies in Multiversion 8

Parameters

\Symfony\Component\HttpFoundation\Request $request:

Return value

boolean

Overrides WorkspaceNegotiatorInterface::applies

File

src/Workspace/SessionWorkspaceNegotiator.php, line 28

Class

SessionWorkspaceNegotiator

Namespace

Drupal\multiversion\Workspace

Code

public function applies(Request $request) {

  // This negotiator only applies if the current user is authenticated,
  // i.e. a session exists.
  return $this->currentUser
    ->isAuthenticated();
}