public function SessionWorkspaceNegotiator::applies in Workspace 8.2
Checks whether the negotiator applies to the current request or not.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The HTTP request.
Return value
bool TRUE if the negotiator applies for the current request, FALSE otherwise.
Overrides WorkspaceNegotiatorInterface::applies
File
- src/
Negotiator/ SessionWorkspaceNegotiator.php, line 56
Class
- SessionWorkspaceNegotiator
- Defines the session workspace negotiator.
Namespace
Drupal\workspace\NegotiatorCode
public function applies(Request $request) {
// This negotiator only applies if the current user is authenticated.
return $this->currentUser
->isAuthenticated();
}