WorkspaceSelectorSidebarComponent implements SidebarComponentInterface
Read onlyYes
FinalYes
Workspace selector sidebar component.
Renders the workspace selector in the sidebar, allowing users to switch between different workspaces.
The web component fetches workspace data from the workspace_info AJAX endpoint and handles switching via workspace_switch endpoint.
Attributes
- #[AsSidebarComponent]
- $identifier: 'workspace-selector'
- $before: ['module-menu']
Table of Contents
Interfaces
- SidebarComponentInterface
- Interface for backend sidebar components.
Methods
- __construct() : mixed
- getResult() : SidebarComponentResult
- Render the sidebar component HTML.
- hasAccess() : bool
- Check if the current user has access to this sidebar component.
Methods
__construct()
public
__construct(WorkspaceService $workspaceService) : mixed
Parameters
- $workspaceService : WorkspaceService
getResult()
Render the sidebar component HTML.
public
getResult(SidebarComponentContext $context) : SidebarComponentResult
Parameters
- $context : SidebarComponentContext
Return values
SidebarComponentResulthasAccess()
Check if the current user has access to this sidebar component.
public
hasAccess(SidebarComponentContext $context) : bool
Parameters
- $context : SidebarComponentContext