StagesService

readonly class \TYPO3\CMS\Workspaces\Service\StagesService

Table of Contents

Constants

STAGE_EDIT_ID  : mixed = 0
STAGE_PUBLISH_EXECUTE_ID  : mixed = -20
If a record is in the "ready to publish" stage STAGE_PUBLISH_ID the next stage is STAGE_PUBLISH_EXECUTE_ID, this id is never saved in db.
STAGE_PUBLISH_ID  : mixed = -10

Methods

__construct()  : mixed
getBackendUsers()  : array
Gets backend user records from a given list of ids.
getNextStage()  : WorkspaceStage
getNextStageForElementCollection()  : array
Retrieve the next stage based on the lowest stage given in the $workspaceItems record array.
getPositionOfCurrentStage()  : int
getPreviousStage()  : WorkspaceStage
getPreviousStageForElementCollection()  : array
Find the highest possible "previous" stage for all $byTableName
getResponsibleBeUser()  : array
Gets all backend user records that are considered to be responsible for a particular stage or workspace.
getStage()  : WorkspaceStage
getStagesForWSUser()  : WorkspaceStage[]
Returns an array of stages, the user is allowed to send to
getStageTitle()  : string
Gets the title of a stage.
resolveBackendUserIds()  : int[]
Resolves backend user ids from a mixed list of backend users and backend user groups (e.g. "be_users_1,be_groups_3,be_users_4,...")
getBackendUser()  : BackendUserAuthentication
getLanguageService()  : LanguageService

Constants

STAGE_EDIT_ID

public mixed STAGE_EDIT_ID = 0

STAGE_PUBLISH_EXECUTE_ID

If a record is in the "ready to publish" stage STAGE_PUBLISH_ID the next stage is STAGE_PUBLISH_EXECUTE_ID, this id is never saved in db.

Deprecated

since TYPO3 v15.0, will be removed in TYPO3 v16.0. Use explicit publish actions instead of checking for this stage ID.

public mixed STAGE_PUBLISH_EXECUTE_ID = -20

STAGE_PUBLISH_ID

public mixed STAGE_PUBLISH_ID = -10

Methods

getBackendUsers()

Gets backend user records from a given list of ids.

public getBackendUsers(array $backendUserIds) : array

Parameters

$backendUserIds : array

Return values

array

getNextStageForElementCollection()

Retrieve the next stage based on the lowest stage given in the $workspaceItems record array.

public getNextStageForElementCollection(WorkspaceStage[] $stages, array $workspaceItems) : array

Parameters

$stages : WorkspaceStage[]
$workspaceItems : array

Return values

array

getPreviousStageForElementCollection()

Find the highest possible "previous" stage for all $byTableName

public getPreviousStageForElementCollection(WorkspaceStage[] $stages, array $workspaceItems) : array

Parameters

$stages : WorkspaceStage[]
$workspaceItems : array

Return values

array

getResponsibleBeUser()

Gets all backend user records that are considered to be responsible for a particular stage or workspace.

public getResponsibleBeUser(WorkspaceStage $stageRecord) : array

Parameters

$stageRecord : WorkspaceStage

Return values

array —

be_users with e-mail and name

getStageTitle()

Gets the title of a stage.

public getStageTitle(int $stageId) : string

Used by hooks that don't know Workspace and WorkspaceStage data objects. Use WorkspaceStage->title in workspace BE module context.

Parameters

$stageId : int

Return values

string

resolveBackendUserIds()

Resolves backend user ids from a mixed list of backend users and backend user groups (e.g. "be_users_1,be_groups_3,be_users_4,...")

public resolveBackendUserIds(string $backendUserGroupList) : int[]

Parameters

$backendUserGroupList : string

Return values

int[]
On this page