![]() |
TYPO3
7.6
|
Public Member Functions | |
getAvailableWorkspaces () | |
getCurrentWorkspace () | |
getCmdArrayForPublishWS ($wsid, $doSwap, $pageId=0, $language=null) | |
getCmdArrayForFlushWS ($wsid, $flush=true, $pageId=0, $language=null) | |
selectVersionsInWorkspace ($wsid, $filter=0, $stage=-99, $pageId=-1, $recursionLevel=0, $selectionType= 'tables_select', $language=null) | |
canCreatePreviewLink ($pageUid, $workspaceUid) | |
generateWorkspacePreviewLink ($uid) | |
generateWorkspacePreviewLinksForAllLanguages ($uid) | |
getLivePageUid ($uid) | |
hasPageRecordVersions ($workspace, $pageId) | |
Static Public Member Functions | |
static | getWorkspaceTitle ($wsId) |
static | isOldStyleWorkspaceUsed () |
static | isNewPage ($id, $language=0) |
static | viewSingleRecord ($table, $uid, array $liveRecord=null, array $versionRecord=null) |
Public Attributes | |
const | TABLE_WORKSPACE = 'sys_workspace' |
const | SELECT_ALL_WORKSPACES = -98 |
const | LIVE_WORKSPACE_ID = 0 |
Protected Member Functions | |
selectAllVersionsFromPages ($table, $pageList, $wsid, $filter, $stage, $language=null) | |
getMoveToPlaceHolderFromPages ($table, $pageList, $wsid, $filter, $stage) | |
filterPermittedElements ($recs, $table) | |
isPageAccessibleForCurrentUser ($table, array $record) | |
isLanguageAccessibleForCurrentUser ($table, array $record) | |
getDatabaseConnection () | |
getObjectManager () | |
Protected Attributes | |
$pageCache = array() | |
$versionsOnPageCache = array() | |
Workspace service
Definition at line 26 of file WorkspaceService.php.
canCreatePreviewLink | ( | $pageUid, | |
$workspaceUid | |||
) |
Determine whether this page for the current
int | $pageUid | |
int | $workspaceUid |
Definition at line 617 of file WorkspaceService.php.
References $GLOBALS, Enumeration\cast(), VersionState\DELETE_PLACEHOLDER, BackendUtility\getRecord(), GeneralUtility\inList(), and BackendUtility\workspaceOL().
|
protected |
Remove all records which are not permitted for the user
array | $recs | |
string | $table |
Definition at line 433 of file WorkspaceService.php.
References WorkspaceService\isLanguageAccessibleForCurrentUser(), and WorkspaceService\isPageAccessibleForCurrentUser().
Referenced by WorkspaceService\selectVersionsInWorkspace().
generateWorkspacePreviewLink | ( | $uid | ) |
Generates a workspace preview link.
int | $uid | The ID of the record to be linked |
Definition at line 641 of file WorkspaceService.php.
References $GLOBALS, WorkspaceService\getCurrentWorkspace(), GeneralUtility\implodeArrayForUrl(), and GeneralUtility\makeInstance().
Referenced by WorkspaceService\generateWorkspacePreviewLinksForAllLanguages().
generateWorkspacePreviewLinksForAllLanguages | ( | $uid | ) |
Generate workspace preview links for all available languages of a page
int | $uid |
Definition at line 687 of file WorkspaceService.php.
References WorkspaceService\generateWorkspacePreviewLink().
getAvailableWorkspaces | ( | ) |
retrieves the available workspaces from the database and checks whether they're available to the current BE user
Definition at line 47 of file WorkspaceService.php.
References $GLOBALS, and BackendUtility\deleteClause().
Referenced by WorkspaceService\getCurrentWorkspace().
getCmdArrayForFlushWS | ( | $wsid, | |
$flush = true , |
|||
$pageId = 0 , |
|||
$language = null |
|||
) |
Building tcemain CMD-array for releasing all versions in a workspace.
int | Real workspace ID, cannot be ONLINE (zero). | |
bool | Run Flush (TRUE) or ClearWSID (FALSE) command | |
int | $pageId | The page id |
int | $language | Select specific language only |
Definition at line 162 of file WorkspaceService.php.
References WorkspaceService\selectVersionsInWorkspace().
getCmdArrayForPublishWS | ( | $wsid, | |
$doSwap, | |||
$pageId = 0 , |
|||
$language = null |
|||
) |
Building tcemain CMD-array for swapping all versions in a workspace.
int | Real workspace ID, cannot be ONLINE (zero). | |
bool | If set, then the currently online versions are swapped into the workspace in exchange for the offline versions. Otherwise the workspace is emptied. | |
int | $pageId | The page id |
int | $language | Select specific language only |
Definition at line 127 of file WorkspaceService.php.
References BackendUtility\getRecord(), and WorkspaceService\selectVersionsInWorkspace().
getCurrentWorkspace | ( | ) |
Gets the current workspace ID.
Definition at line 71 of file WorkspaceService.php.
References $GLOBALS, and WorkspaceService\getAvailableWorkspaces().
Referenced by WorkspaceService\generateWorkspacePreviewLink().
|
protected |
Definition at line 777 of file WorkspaceService.php.
References $GLOBALS.
Referenced by WorkspaceService\getMoveToPlaceHolderFromPages(), WorkspaceService\hasPageRecordVersions(), and WorkspaceService\selectAllVersionsFromPages().
getLivePageUid | ( | $uid | ) |
Find the Live-Uid for a given page, the results are cached at run-time to avoid too many database-queries
\InvalidArgumentException |
int | $uid |
Definition at line 708 of file WorkspaceService.php.
References BackendUtility\getRecord().
|
protected |
Find all moved records at their new position.
string | $table | |
string | $pageList | |
int | $wsid | |
int | $filter | |
int | $stage |
Definition at line 320 of file WorkspaceService.php.
References VersionState\DEFAULT_STATE, BackendUtility\deleteClause(), elseif, WorkspaceService\getDatabaseConnection(), VersionState\MOVE_PLACEHOLDER, and VersionState\MOVE_POINTER.
Referenced by WorkspaceService\selectVersionsInWorkspace().
|
protected |
Definition at line 785 of file WorkspaceService.php.
References GeneralUtility\makeInstance().
|
static |
Find the title for the requested workspace.
int | $wsId |
\InvalidArgumentException |
Definition at line 98 of file WorkspaceService.php.
References $GLOBALS, and BackendUtility\getRecord().
Referenced by PageTreeNavigationController\getWorkspaceInfo(), ToolbarMenu\setWorkspace(), and AjaxController\switchWorkspaceAction().
hasPageRecordVersions | ( | $workspace, | |
$pageId | |||
) |
Checks if a page has record versions according to a given workspace
int | $workspace | |
int | $pageId |
Definition at line 728 of file WorkspaceService.php.
References $GLOBALS, BackendUtility\deleteClause(), WorkspaceService\getDatabaseConnection(), and VersionState\MOVE_POINTER.
|
protected |
Check current be users language access on given record.
string | $table | Name of the table |
array | $record | Record row to be checked |
Definition at line 475 of file WorkspaceService.php.
References $GLOBALS, and BackendUtility\isTableLocalizable().
Referenced by WorkspaceService\filterPermittedElements().
|
static |
Determine whether a specific page is new and not yet available in the LIVE workspace
int | $id | Primary key of the page to check |
int | $language | Language for which to check the page |
Definition at line 513 of file WorkspaceService.php.
References $GLOBALS, Enumeration\cast(), BackendUtility\deleteClause(), BackendUtility\getRecord(), and VersionState\NEW_PLACEHOLDER.
|
static |
Trivial check to see if the user already migrated his workspaces to the new style (either manually or with the migrator scripts)
Definition at line 491 of file WorkspaceService.php.
References $GLOBALS.
|
protected |
Checking access to the page the record is on, respecting ignored root level restrictions
string | $table | Name of the table |
array | $record | Record row to be checked |
Definition at line 453 of file WorkspaceService.php.
References $GLOBALS, BackendUtility\getRecord(), and BackendUtility\isRootLevelRestrictionIgnored().
Referenced by WorkspaceService\filterPermittedElements().
|
protected |
Find all versionized elements except moved records.
string | $table | |
string | $pageList | |
int | $wsid | |
int | $filter | |
int | $stage | |
int | $language |
Definition at line 250 of file WorkspaceService.php.
References $GLOBALS, MathUtility\canBeInterpretedAsInteger(), BackendUtility\deleteClause(), elseif, WorkspaceService\getDatabaseConnection(), BackendUtility\isRootLevelRestrictionIgnored(), BackendUtility\isTableLocalizable(), and VersionState\MOVE_POINTER.
Referenced by WorkspaceService\selectVersionsInWorkspace().
selectVersionsInWorkspace | ( | $wsid, | |
$filter = 0 , |
|||
$stage = -99 , |
|||
$pageId = -1 , |
|||
$recursionLevel = 0 , |
|||
$selectionType = 'tables_select' , |
|||
$language = null |
|||
) |
Select all records from workspace pending for publishing Used from backend to display workspace overview User for auto-publishing for selecting versions for publication
int | Workspace 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 | Lifecycle filter: 1 = select all drafts (never-published), 2 = select all published one or more times (archive/multiple), anything else selects all. | |
int | Stage filter: -99 means no filtering, otherwise it will be used to select only elements with that stage. For publishing, that would be "10 | |
int | Page id: Live page for which to find versions in workspace! | |
int | Recursion Level - select versions recursive - parameter is only relevant if $pageId != -1 | |
string | How to collect records for "listing" or "modify" these tables. Support the permissions of each type of record, see ::check. | |
int | $language | Select specific language only |
Definition at line 196 of file WorkspaceService.php.
References $GLOBALS, elseif, WorkspaceService\filterPermittedElements(), WorkspaceService\getMoveToPlaceHolderFromPages(), and WorkspaceService\selectAllVersionsFromPages().
Referenced by WorkspaceService\getCmdArrayForFlushWS(), and WorkspaceService\getCmdArrayForPublishWS().
|
static |
Generates a view link for a page.
string | $table | Table to be used |
int | $uid | Uid of the version(!) record |
array | $liveRecord | Optional live record data |
array | $versionRecord | Optional version record data |
Definition at line 545 of file WorkspaceService.php.
References $GLOBALS, GeneralUtility\callUserFunction(), Enumeration\cast(), elseif, BackendUtility\getLiveVersionIdOfRecord(), BackendUtility\getLiveVersionOfRecord(), BackendUtility\getMovePlaceholder(), BackendUtility\getPagesTSconfig(), BackendUtility\getRecord(), BackendUtility\isTableLocalizable(), VersionState\MOVE_POINTER, and BackendUtility\viewOnClick().
|
protected |
Definition at line 31 of file WorkspaceService.php.
|
protected |
Definition at line 36 of file WorkspaceService.php.
const LIVE_WORKSPACE_ID = 0 |
Definition at line 40 of file WorkspaceService.php.
Referenced by MassActionHandler\getMassStageActions().
const SELECT_ALL_WORKSPACES = -98 |
Definition at line 39 of file WorkspaceService.php.
Referenced by ReviewController\fullIndexAction(), MassActionHandler\getMassStageActions(), ReviewController\getModuleUri(), ExtDirectServer\getStageActions(), and ReviewController\prepareWorkspaceTabs().
const TABLE_WORKSPACE = 'sys_workspace' |
Definition at line 38 of file WorkspaceService.php.