TYPO3
7.6
|
Public Member Functions | |
getWorkspaceId () | |
getPreviousStageForElementCollection ($workspaceItems, array $byTableName=array('tt_content', 'pages', 'pages_language_overlay')) | |
getNextStageForElementCollection ($workspaceItems, array $byTableName=array('tt_content', 'pages', 'pages_language_overlay')) | |
getStagesForWS () | |
getStageTitle ($ver_stage) | |
getStageRecord ($stageid) | |
getNextStage ($stageId) | |
getNextStages (array &$nextStageArray, $stageId) | |
getPrevStage ($stageId) | |
getPrevStages (array &$prevStageArray, $stageId) | |
getResponsibleBeUser ($stageRecord, $selectDefaultUserField=false) | |
getResponsibleUser ($stageRespValue) | |
resolveBackendUserIds ($backendUserGroupList) | |
getBackendUsers ($backendUserList) | |
getPreselectedRecipients (StageRecord $stageRecord) | |
getPropertyOfCurrentWorkspaceStage ($stageId, $property) | |
getPositionOfCurrentStage ($stageId) | |
isPrevStageAllowedForUser ($stageId) | |
isNextStageAllowedForUser ($stageId) | |
isValid ($stageId) | |
getNotificationMode ($stageId) | |
getRecordService () | |
Public Attributes | |
const | TABLE_STAGE = 'sys_workspace_stage' |
const | STAGE_PUBLISH_EXECUTE_ID = -20 |
const | STAGE_PUBLISH_ID = -10 |
const | STAGE_EDIT_ID = 0 |
const | MODE_NOTIFY_SOMEONE = 0 |
const | MODE_NOTIFY_ALL = 1 |
const | MODE_NOTIFY_ALL_STRICT = 2 |
Protected Member Functions | |
prepareStagesArray (array $stageRecords) | |
getWorkspaceRecord () | |
isStageAllowedForUser ($stageId) | |
getBackendUser () | |
getDatabaseConnection () | |
Protected Attributes | |
$recordService | |
$workspaceStageCache = array() | |
$workspaceStageAllowedCache = array() | |
$fetchGroupsCache = array() | |
$userGroups = array() | |
Private Member Functions | |
fetchGroups ($grList, $idList= '') | |
fetchGroupsFromDB (array $groups) | |
fetchGroupsRecursive ($grList, $idList= '') | |
Private Attributes | |
$pathToLocallang = 'LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf' | |
Stages service
Definition at line 26 of file StagesService.php.
|
private |
$grList | ||
string | $idList |
Definition at line 556 of file StagesService.php.
References StagesService\fetchGroupsRecursive().
Referenced by StagesService\fetchGroupsRecursive(), and StagesService\resolveBackendUserIds().
|
private |
array | $groups |
Definition at line 577 of file StagesService.php.
References $GLOBALS.
Referenced by StagesService\fetchGroupsRecursive().
|
private |
Fetches particular groups recursively.
$grList | ||
string | $idList |
Definition at line 595 of file StagesService.php.
References $GLOBALS, StagesService\$userGroups, StagesService\fetchGroups(), StagesService\fetchGroupsFromDB(), GeneralUtility\inList(), and GeneralUtility\intExplode().
Referenced by StagesService\fetchGroups().
|
protected |
Definition at line 809 of file StagesService.php.
References $GLOBALS.
Referenced by StagesService\getWorkspaceId().
getBackendUsers | ( | $backendUserList | ) |
Gets backend user records from a given list of ids.
string | $backendUserList |
Definition at line 509 of file StagesService.php.
References BackendUtility\BEenableFields(), StagesService\getDatabaseConnection(), and BackendUtility\getUserNames().
Referenced by StagesService\getResponsibleBeUser().
|
protected |
Definition at line 817 of file StagesService.php.
References $GLOBALS.
Referenced by StagesService\getBackendUsers().
getNextStage | ( | $stageId | ) |
Gets next stage in process for given stage id
int | $stageId | Id of the stage to fetch the next one for |
\InvalidArgumentException |
Definition at line 304 of file StagesService.php.
References $GLOBALS, MathUtility\canBeInterpretedAsInteger(), and StagesService\getStagesForWS().
Referenced by StagesService\getNextStageForElementCollection(), StagesService\getNextStages(), and StagesService\isNextStageAllowedForUser().
getNextStageForElementCollection | ( | $workspaceItems, | |
array | $byTableName = array('tt_content', 'pages', 'pages_language_overlay') |
||
) |
Retrieve the next stage based on the lowest stage given in the $workspaceItems record array.
array | $workspaceItems | |
array | $byTableName |
Definition at line 137 of file StagesService.php.
References StagesService\getNextStage(), and StagesService\getStagesForWS().
getNextStages | ( | array & | $nextStageArray, |
$stageId | |||
) |
Recursive function to get all next stages for a record depending on user permissions
array | $nextStageArray | Next stages |
int | $stageId | Current stage id of the record |
Definition at line 340 of file StagesService.php.
References StagesService\getNextStage(), and StagesService\isStageAllowedForUser().
getNotificationMode | ( | $stageId | ) |
Returns the notification mode from stage configuration
Return values: 0 = notify someone / old way / default setting 1 = notify all responsible users (some users checked per default and you're not allowed to uncheck them) 2 = notify all responsible users (all users are checked and nothing can be changed during stage change)
int | $stageId | Stage id to return the notification mode for |
\InvalidArgumentException |
Definition at line 771 of file StagesService.php.
References $GLOBALS, MathUtility\canBeInterpretedAsInteger(), BackendUtility\getRecord(), and StagesService\getWorkspaceId().
getPositionOfCurrentStage | ( | $stageId | ) |
Gets the position of the given workspace in the hole process f.e. 3 means step 3 of 20, by which 1 is edit and 20 is ready to publish
int | $stageId |
Definition at line 656 of file StagesService.php.
References StagesService\getStagesForWS().
getPreselectedRecipients | ( | StageRecord | $stageRecord | ) |
StageRecord | $stageRecord |
Definition at line 531 of file StagesService.php.
References StageRecord\areEditorsPreselected(), StageRecord\getPreselectedRecipients(), and StagesService\getRecordService().
getPreviousStageForElementCollection | ( | $workspaceItems, | |
array | $byTableName = array('tt_content', 'pages', 'pages_language_overlay') |
||
) |
Find the highest possible "previous" stage for all $byTableName
array | $workspaceItems | |
array | $byTableName |
Definition at line 89 of file StagesService.php.
References StagesService\getPrevStage(), and StagesService\getStagesForWS().
getPrevStage | ( | $stageId | ) |
Get next stage in process for given stage id
int | $stageId | Id of the stage to fetch the previous one for |
\InvalidArgumentException |
Definition at line 372 of file StagesService.php.
References $GLOBALS, MathUtility\canBeInterpretedAsInteger(), and StagesService\getStagesForWS().
Referenced by StagesService\getPreviousStageForElementCollection(), StagesService\getPrevStages(), and StagesService\isPrevStageAllowedForUser().
getPrevStages | ( | array & | $prevStageArray, |
$stageId | |||
) |
Recursive function to get all prev stages for a record depending on user permissions
array | $prevStageArray | Prev stages |
int | $stageId | Current stage id of the record |
Definition at line 401 of file StagesService.php.
References StagesService\getPrevStage(), and StagesService\isStageAllowedForUser().
getPropertyOfCurrentWorkspaceStage | ( | $stageId, | |
$property | |||
) |
Gets a property of a workspaces stage.
int | $stageId | |
string | $property |
\InvalidArgumentException |
Definition at line 636 of file StagesService.php.
References $GLOBALS, MathUtility\canBeInterpretedAsInteger(), and BackendUtility\getRecord().
Referenced by StagesService\getStageTitle().
getRecordService | ( | ) |
Definition at line 798 of file StagesService.php.
References StagesService\$recordService, and GeneralUtility\makeInstance().
Referenced by StagesService\getPreselectedRecipients().
getResponsibleBeUser | ( | $stageRecord, | |
$selectDefaultUserField = false |
|||
) |
Gets all backend user records that are considered to be responsible for a particular stage or workspace.
StageRecord | int | $stageRecord | Stage |
bool | $selectDefaultUserField | If field notification_defaults should be selected instead of responsible users |
Definition at line 427 of file StagesService.php.
References StagesService\getBackendUsers(), and StagesService\getWorkspaceRecord().
getResponsibleUser | ( | $stageRespValue | ) |
Gets backend user ids from a mixed list of backend users and backend users groups. This is used for notifying persons responsible for a particular stage or workspace.
string | $stageRespValue | Responsible_person value from stage record |
Definition at line 457 of file StagesService.php.
References StagesService\resolveBackendUserIds().
getStageRecord | ( | $stageid | ) |
Gets a particular stage record.
int | $stageid |
Definition at line 292 of file StagesService.php.
References BackendUtility\getRecord().
getStagesForWS | ( | ) |
Building an array with all stage ids and titles related to the given workspace
Definition at line 183 of file StagesService.php.
References elseif, StagesService\getWorkspaceId(), StagesService\getWorkspaceRecord(), and StagesService\prepareStagesArray().
Referenced by StagesService\getNextStage(), StagesService\getNextStageForElementCollection(), StagesService\getPositionOfCurrentStage(), StagesService\getPreviousStageForElementCollection(), StagesService\getPrevStage(), and StagesService\isValid().
getStageTitle | ( | $ver_stage | ) |
Gets the title of a stage.
int | $ver_stage |
Definition at line 264 of file StagesService.php.
References $GLOBALS, and StagesService\getPropertyOfCurrentWorkspaceStage().
getWorkspaceId | ( | ) |
Getter for current workspace id
Definition at line 77 of file StagesService.php.
References StagesService\getBackendUser().
Referenced by StagesService\getNotificationMode(), StagesService\getStagesForWS(), StagesService\getWorkspaceRecord(), and StagesService\isStageAllowedForUser().
|
protected |
Definition at line 546 of file StagesService.php.
References WorkspaceRecord\get(), and StagesService\getWorkspaceId().
Referenced by StagesService\getResponsibleBeUser(), and StagesService\getStagesForWS().
isNextStageAllowedForUser | ( | $stageId | ) |
Check if the user has access to the next stage, relative to the given stage
int | $stageId |
Definition at line 707 of file StagesService.php.
References StagesService\getNextStage(), and StagesService\isStageAllowedForUser().
isPrevStageAllowedForUser | ( | $stageId | ) |
Check if the user has access to the previous stage, relative to the given stage
int | $stageId |
Definition at line 685 of file StagesService.php.
References StagesService\getPrevStage(), and StagesService\isStageAllowedForUser().
|
protected |
$stageId |
Definition at line 727 of file StagesService.php.
References $GLOBALS, and StagesService\getWorkspaceId().
Referenced by StagesService\getNextStages(), StagesService\getPrevStages(), StagesService\isNextStageAllowedForUser(), and StagesService\isPrevStageAllowedForUser().
isValid | ( | $stageId | ) |
Determines whether a stage Id is valid.
int | $stageId | The stage Id to be checked |
Definition at line 746 of file StagesService.php.
References StagesService\getStagesForWS().
|
protected |
Prepares simplified stages array to be used in ExtJs components.
StageRecord[] | $stageRecords |
Definition at line 240 of file StagesService.php.
References $GLOBALS.
Referenced by StagesService\getStagesForWS().
resolveBackendUserIds | ( | $backendUserGroupList | ) |
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,...")
string | $backendUserGroupList |
Definition at line 469 of file StagesService.php.
References elseif, StagesService\fetchGroups(), BackendUtility\getUserNames(), GeneralUtility\inList(), and GeneralUtility\trimExplode().
Referenced by StagesService\getResponsibleUser().
|
protected |
Definition at line 65 of file StagesService.php.
|
private |
Definition at line 43 of file StagesService.php.
|
protected |
Definition at line 48 of file StagesService.php.
Referenced by StagesService\getRecordService().
|
protected |
Definition at line 70 of file StagesService.php.
Referenced by StagesService\fetchGroupsRecursive().
|
protected |
Definition at line 60 of file StagesService.php.
|
protected |
Definition at line 55 of file StagesService.php.
const MODE_NOTIFY_ALL = 1 |
Definition at line 35 of file StagesService.php.
const MODE_NOTIFY_ALL_STRICT = 2 |
Definition at line 36 of file StagesService.php.
const MODE_NOTIFY_SOMEONE = 0 |
Definition at line 34 of file StagesService.php.
const STAGE_EDIT_ID = 0 |
Definition at line 33 of file StagesService.php.
Referenced by WorkspaceRecord\getStages(), and StageRecord\isEditStage().
const STAGE_PUBLISH_EXECUTE_ID = -20 |
Definition at line 30 of file StagesService.php.
Referenced by WorkspaceRecord\getStages(), StageRecord\isExecuteStage(), ActionHandler\sendToNextStageExecute(), ActionHandler\sendToSpecificStageExecute(), and ActionHandler\sentCollectionToStage().
const STAGE_PUBLISH_ID = -10 |
Definition at line 32 of file StagesService.php.
Referenced by WorkspaceRecord\getStages(), and StageRecord\isPublishStage().
const TABLE_STAGE = 'sys_workspace_stage' |
Definition at line 28 of file StagesService.php.