TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Version\Utility\WorkspacesUtility Class Reference

Public Member Functions

 getCmdArrayForPublishWS ($wsid, $doSwap, $pageId=0)
 
 selectVersionsInWorkspace ($wsid, $filter=0, $stage=-99, $pageId=-1)
 
 autoPublishWorkspaces ()
 

Detailed Description

Library with Workspace related functionality

Definition at line 22 of file WorkspacesUtility.php.

Member Function Documentation

◆ autoPublishWorkspaces()

TYPO3\CMS\Version\Utility\WorkspacesUtility::autoPublishWorkspaces ( )

This method is called by the Scheduler task that triggers the autopublication process It searches for workspaces whose publication date is in the past and publishes them

Returns
void

Definition at line 106 of file WorkspacesUtility.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\deleteClause(), TYPO3\CMS\Version\Utility\WorkspacesUtility\getCmdArrayForPublishWS(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

◆ getCmdArrayForPublishWS()

TYPO3\CMS\Version\Utility\WorkspacesUtility::getCmdArrayForPublishWS (   $wsid,
  $doSwap,
  $pageId = 0 
)

Building tcemain CMD-array for swapping all versions in a workspace.

Parameters
int$wsidReal workspace ID, cannot be ONLINE (zero).
bool$doSwapIf set, then the currently online versions are swapped into the workspace in exchange for the offline versions. Otherwise the workspace is emptied.
int$pageId
Returns
array Command array for tcemain

Definition at line 32 of file WorkspacesUtility.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), and TYPO3\CMS\Version\Utility\WorkspacesUtility\selectVersionsInWorkspace().

Referenced by TYPO3\CMS\Version\Utility\WorkspacesUtility\autoPublishWorkspaces().

◆ selectVersionsInWorkspace()

TYPO3\CMS\Version\Utility\WorkspacesUtility::selectVersionsInWorkspace (   $wsid,
  $filter = 0,
  $stage = -99,
  $pageId = -1 
)

Select all records from workspace pending for publishing Used from backend to display workspace overview User for auto-publishing for selecting versions for publication

Parameters
int$wsidWorkspace ID. If -99, will select ALL versions from ANY workspace. If -98 will select all but ONLINE. >=-1 will select from the actual workspace
int$filterLifecycle filter: 1 = select all drafts (never-published), 2 = select all published one or more times (archive/multiple), anything else selects all.
int$stageStage filter: -99 means no filtering, otherwise it will be used to select only elements with that stage. For publishing, that would be "10
int$pageIdPage id: Live page for which to find versions in workspace!
Returns
array Array of all records uids etc. First key is table name, second key incremental integer. Records are associative arrays with uid and t3ver_oid fields. The REAL pid of the online record is found as "realpid

Definition at line 73 of file WorkspacesUtility.php.

References $GLOBALS, and TYPO3\CMS\Backend\Utility\BackendUtility\deleteClause().

Referenced by TYPO3\CMS\Version\Utility\WorkspacesUtility\getCmdArrayForPublishWS().