tool_workspace
Security covered
The Tool - Workspace module provides workspace management tools that integrate the Tool module with the core Workspaces module. It enables content staging operations through the Tool module's plugin system.
The primary use case for this module is:
- Create and manage workspaces programmatically
- Switch between workspaces during automated workflows
- Check workspace status and existence before performing operations
- Integrate workspace operations into tool-based workflows
REQUIREMENTS
This module requires the following modules:
- Tool (tool)
- Workspaces (core)
Optional modules for extended functionality:
- WSE (wse) - For workspace revert functionality
- WSE Preview (part of wse module) - For generating shareable workspace preview links
INSTALLATION
Install as you would normally install a contributed Drupal module. See: https://www.drupal.org/docs/extending-drupal/installing-modules for further information.
TOOLS PROVIDED
- Check workspace exists (
workspace_exists): Verifies if a workspace with the given ID exists. - Get active workspace (
workspace_get_active): Returns information about the currently active workspace or indicates if viewing the Live site. - Create workspace (
workspace_create): Creates a new workspace without switching to it. - Switch workspace (
workspace_switch): Switches the current session to an existing workspace. - Create and switch to workspace (
workspace_create_and_switch): Creates a new workspace and immediately switches to it with rollback on failure. - Get workspace tracked content (
workspace_tracked_content): Returns
tracked content in a workspace with summary counts and optional detailed
listing. - Publish workspace (
workspace_publish): Publishes all tracked content in
a workspace to Live. Only top-level workspaces can be published. - Revert workspace (
workspace_revert): Reverts a published (closed)
workspace, undoing its changes from Live and reopening it. Requires the WSE
module. - Generate workspace preview link (
workspace_preview_link): Generates a
shareable preview link for a workspace with configurable expiry. Requires the
WSE Preview module. - Delete workspace (
workspace_delete): Deletes an non-active workspace.
WORKSPACE COMPATIBILITY
This module marks certain operational entity types as ignored by workspaces, allowing them to be saved regardless of the active workspace context.
Currently ignored entity types:
- ai_agent_decision - Enables compatibility with AI Agents Explorer module
- ai_log - Compatibility of the AI logging