public function SessionWorkspaceNegotiator::applies in Drupal 10
Same name and namespace in other branches
- 8 core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php \Drupal\workspaces\Negotiator\SessionWorkspaceNegotiator::applies()
- 9 core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php \Drupal\workspaces\Negotiator\SessionWorkspaceNegotiator::applies()
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
1 method overrides SessionWorkspaceNegotiator::applies()
- QueryParameterWorkspaceNegotiator::applies in core/
modules/ workspaces/ src/ Negotiator/ QueryParameterWorkspaceNegotiator.php - Checks whether the negotiator applies to the current request or not.
File
- core/
modules/ workspaces/ src/ Negotiator/ SessionWorkspaceNegotiator.php, line 56
Class
- SessionWorkspaceNegotiator
- Defines the session workspace negotiator.
Namespace
Drupal\workspaces\NegotiatorCode
public function applies(Request $request) {
// This negotiator only applies if the current user is authenticated.
return $this->currentUser
->isAuthenticated();
}