You are here

public function WorkspaceManager::hasActiveWorkspace in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/workspaces/src/WorkspaceManager.php \Drupal\workspaces\WorkspaceManager::hasActiveWorkspace()

Determines whether a workspace is active in the current request.

Return value

bool TRUE if a workspace is active, FALSE otherwise.

Overrides WorkspaceManagerInterface::hasActiveWorkspace

1 call to WorkspaceManager::hasActiveWorkspace()
WorkspaceManager::shouldAlterOperations in core/modules/workspaces/src/WorkspaceManager.php
Determines whether runtime entity operations should be altered.

File

core/modules/workspaces/src/WorkspaceManager.php, line 166

Class

WorkspaceManager
Provides the workspace manager.

Namespace

Drupal\workspaces

Code

public function hasActiveWorkspace() {
  return $this
    ->getActiveWorkspace() !== FALSE;
}