StagesService
readonly class \
Internal
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Constants
- STAGE_EDIT_ID : mixed = 0
- STAGE_PUBLISH_EXECUTE_ID : mixed = -20
- 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
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 $backendUserIds) : array
Parameters
- $backendUserIds : array
Return values
arraygetNextStage()
public
getNextStage(WorkspaceStage[] $stages, int $stageId) : WorkspaceStage
Parameters
- $stages : WorkspaceStage[]
- $stageId : int
Tags
Return values
WorkspaceStagegetNextStageForElementCollection()
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
arraygetPositionOfCurrentStage()
public
getPositionOfCurrentStage(WorkspaceStage[] $stages, int $stageId) : int
Parameters
- $stages : WorkspaceStage[]
- $stageId : int
Return values
intgetPreviousStage()
public
getPreviousStage(WorkspaceStage[] $stages, int $stageId) : WorkspaceStage
Parameters
- $stages : WorkspaceStage[]
- $stageId : int
Tags
Return values
WorkspaceStagegetPreviousStageForElementCollection()
Find the highest possible "previous" stage for all $byTableName
public
getPreviousStageForElementCollection(WorkspaceStage[] $stages, array $workspaceItems) : array
Parameters
- $stages : WorkspaceStage[]
- $workspaceItems : array
Return values
arraygetResponsibleBeUser()
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
getStage()
public
getStage(WorkspaceStage[] $stages, int $stageId) : WorkspaceStage
Parameters
- $stages : WorkspaceStage[]
- $stageId : int
Tags
Return values
WorkspaceStagegetStagesForWSUser()
Returns an array of stages, the user is allowed to send to
public
getStagesForWSUser(WorkspaceStage[] $stages) : WorkspaceStage[]
Parameters
- $stages : WorkspaceStage[]
Return values
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) : int[]
Parameters
- $backendUserGroupList : string
Return values
int[]getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetLanguageService()
protected
getLanguageService() : LanguageService