StagesService
Read onlyYes
Table of Contents
Constants
- STAGE_EDIT_ID = 0
- STAGE_PUBLISH_EXECUTE_ID = -20
- STAGE_PUBLISH_ID = -10
Methods
- __construct() : mixed
- getBackendUsers() : array<string|int, mixed>
- Gets backend user records from a given list of ids.
- getNextStage() : WorkspaceStage
- getNextStageForElementCollection() : array<string|int, mixed>
- Retrieve the next stage based on the lowest stage given in the $workspaceItems record array.
- getPositionOfCurrentStage() : int
- getPreviousStage() : WorkspaceStage
- getPreviousStageForElementCollection() : array<string|int, mixed>
- Find the highest possible "previous" stage for all $byTableName
- getResponsibleBeUser() : array<string|int, mixed>
- Gets all backend user records that are considered to be responsible for a particular stage or workspace.
- getStage() : WorkspaceStage
- getStagesForWSUser() : array<string|int, WorkspaceStage>
- Returns an array of stages, the user is allowed to send to
- getStageTitle() : string
- Gets the title of a stage.
- resolveBackendUserIds() : array<string|int, 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
public
mixed
STAGE_PUBLISH_EXECUTE_ID
= -20
STAGE_PUBLISH_ID
public
mixed
STAGE_PUBLISH_ID
= -10
Methods
__construct()
public
__construct(GroupResolver $groupResolver) : mixed
Parameters
- $groupResolver : GroupResolver
getBackendUsers()
Gets backend user records from a given list of ids.
public
getBackendUsers(array<string|int, mixed> $backendUserIds) : array<string|int, mixed>
Parameters
- $backendUserIds : array<string|int, mixed>
Return values
array<string|int, mixed>getNextStage()
public
getNextStage(array<string|int, WorkspaceStage> $stages, int $stageId) : WorkspaceStage
Parameters
- $stages : array<string|int, WorkspaceStage>
- $stageId : int
Tags
Return values
WorkspaceStagegetNextStageForElementCollection()
Retrieve the next stage based on the lowest stage given in the $workspaceItems record array.
public
getNextStageForElementCollection(array<string|int, WorkspaceStage> $stages, array<string|int, mixed> $workspaceItems) : array<string|int, mixed>
Parameters
- $stages : array<string|int, WorkspaceStage>
- $workspaceItems : array<string|int, mixed>
Return values
array<string|int, mixed>getPositionOfCurrentStage()
public
getPositionOfCurrentStage(array<string|int, WorkspaceStage> $stages, int $stageId) : int
Parameters
- $stages : array<string|int, WorkspaceStage>
- $stageId : int
Return values
intgetPreviousStage()
public
getPreviousStage(array<string|int, WorkspaceStage> $stages, int $stageId) : WorkspaceStage
Parameters
- $stages : array<string|int, WorkspaceStage>
- $stageId : int
Tags
Return values
WorkspaceStagegetPreviousStageForElementCollection()
Find the highest possible "previous" stage for all $byTableName
public
getPreviousStageForElementCollection(array<string|int, WorkspaceStage> $stages, array<string|int, mixed> $workspaceItems) : array<string|int, mixed>
Parameters
- $stages : array<string|int, WorkspaceStage>
- $workspaceItems : array<string|int, mixed>
Return values
array<string|int, mixed>getResponsibleBeUser()
Gets all backend user records that are considered to be responsible for a particular stage or workspace.
public
getResponsibleBeUser(WorkspaceStage $stageRecord) : array<string|int, mixed>
Parameters
- $stageRecord : WorkspaceStage
Return values
array<string|int, mixed> —be_users with e-mail and name
getStage()
public
getStage(array<string|int, WorkspaceStage> $stages, int $stageId) : WorkspaceStage
Parameters
- $stages : array<string|int, WorkspaceStage>
- $stageId : int
Tags
Return values
WorkspaceStagegetStagesForWSUser()
Returns an array of stages, the user is allowed to send to
public
getStagesForWSUser(array<string|int, WorkspaceStage> $stages) : array<string|int, WorkspaceStage>
Parameters
- $stages : array<string|int, WorkspaceStage>
Return values
array<string|int, WorkspaceStage>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
stringresolveBackendUserIds()
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) : array<string|int, int>
Parameters
- $backendUserGroupList : string
Return values
array<string|int, int>getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetLanguageService()
protected
getLanguageService() : LanguageService