‪TYPO3CMS  10.4
TYPO3\CMS\Core\Context\WorkspaceAspect Class Reference
Inheritance diagram for TYPO3\CMS\Core\Context\WorkspaceAspect:
TYPO3\CMS\Core\Context\AspectInterface

Public Member Functions

 __construct (int $workspaceId=0)
 
int bool get (string $name)
 
int getId ()
 
bool isLive ()
 

Protected Attributes

int $workspaceId
 

Detailed Description

The aspect contains information about the currently accessed workspace.

Allowed properties:

  • ‪id
  • ‪isLive
  • ‪isOffline

Definition at line 30 of file WorkspaceAspect.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Context\WorkspaceAspect::__construct ( int  $workspaceId = 0)
Parameters
int$workspaceId

Definition at line 39 of file WorkspaceAspect.php.

References TYPO3\CMS\Core\Context\WorkspaceAspect\$workspaceId.

Member Function Documentation

◆ get()

int bool TYPO3\CMS\Core\Context\WorkspaceAspect::get ( string  $name)

Fetch the workspace ID, or evaluated the state if it's 'online' or 'offline'

Parameters
string$name
Returns
‪int|bool
Exceptions
AspectPropertyNotFoundException

Implements TYPO3\CMS\Core\Context\AspectInterface.

Definition at line 51 of file WorkspaceAspect.php.

References TYPO3\CMS\Core\Context\WorkspaceAspect\$workspaceId, and TYPO3\CMS\Core\Context\WorkspaceAspect\isLive().

◆ getId()

int TYPO3\CMS\Core\Context\WorkspaceAspect::getId ( )

Return the workspace ID

Returns
‪int

Definition at line 69 of file WorkspaceAspect.php.

References TYPO3\CMS\Core\Context\WorkspaceAspect\$workspaceId.

◆ isLive()

bool TYPO3\CMS\Core\Context\WorkspaceAspect::isLive ( )

Return whether this is live workspace or in a custom offline workspace

Returns
‪bool

Definition at line 79 of file WorkspaceAspect.php.

Referenced by TYPO3\CMS\Core\Context\WorkspaceAspect\get().

Member Data Documentation

◆ $workspaceId

int TYPO3\CMS\Core\Context\WorkspaceAspect::$workspaceId
protected