Copied!

WorkflowServiceInterface

WorkflowServiceInterface.php : 19

Methods

publiccan()

WorkflowServiceInterface.php : 45
public can(WorkflowMetadata $workflow, string $transitionName) : bool

Parameters

Name Type Default value Description
$workflow WorkflowMetadata - -
$transitionName string - -

Return values

bool

publicdeleteContentLocks()

WorkflowServiceInterface.php : 130
public deleteContentLocks(int $contentId) : void

Parameters

Name Type Default value Description
$contentId int - -

publicdeleteLock()

WorkflowServiceInterface.php : 126
public deleteLock(VersionLock $versionLock) : void

Parameters

Name Type Default value Description
$versionLock VersionLock - -

publicdeleteUserLocks()

WorkflowServiceInterface.php : 128
public deleteUserLocks(int $userId) : void

Parameters

Name Type Default value Description
$userId int - -

publicgetVersionLock()

WorkflowServiceInterface.php : 105
public getVersionLock(VersionInfo $versionInfo) : VersionLock

Parameters

Name Type Default value Description
$versionInfo VersionInfo - -

Return values

VersionLock

Tags
Throws
NotFoundException

publicgetVersionLockByContentId()

WorkflowServiceInterface.php : 110
public getVersionLockByContentId(int $contentId, int $versionNo) : VersionLock

Parameters

Name Type Default value Description
$contentId int - -
$versionNo int - -

Return values

VersionLock

Tags
Throws
NotFoundException

publicisVersionLocked()

WorkflowServiceInterface.php : 112
public isVersionLocked(VersionInfo $versionInfo[, int|null $userId = null ]) : bool

Parameters

Name Type Default value Description
$versionInfo VersionInfo - -
$userId int|null null -

Return values

bool

publicloadAllWorkflowMetadata()

WorkflowServiceInterface.php : 72

Loads all workflow metadata stored in the database.

public loadAllWorkflowMetadata() : array<string|int, WorkflowMetadata>

Loading all workflow metadata is highly discouraged, it leads to performance issues. Please use only if you understand the consequences.

Return values

array<string|int, WorkflowMetadata>

Tags
Deprecated

This method is deprecated since eZ Platform 3.0 and will be removed in 4.0.

publicloadOngoingWorkflowMetadata()

WorkflowServiceInterface.php : 79
public loadOngoingWorkflowMetadata([int $limit = 10 ][, int $offset = 0 ]) : array<string|int, WorkflowMetadata>

Parameters

Name Type Default value Description
$limit int 10 -
$offset int 0 -

Return values

array<string|int, WorkflowMetadata>

publicloadOngoingWorkflowMetadataOriginatedByUser()

WorkflowServiceInterface.php : 87
public loadOngoingWorkflowMetadataOriginatedByUser(UserReference $user[, string|null $name = null ][, int $limit = 10 ][, int $offset = 0 ]) : array<string|int, WorkflowMetadata>

Parameters

Name Type Default value Description
$user UserReference - -
$name string|null null -
$limit int 10 -
$offset int 0 -

Return values

array<string|int, WorkflowMetadata>

publicloadWorkflowMetadataByStage()

WorkflowServiceInterface.php : 100
public loadWorkflowMetadataByStage(string $workflowName, string $stageName) : array<string|int, WorkflowMetadata>

Parameters

Name Type Default value Description
$workflowName string - -
$stageName string - -

Return values

array<string|int, WorkflowMetadata>

publicloadWorkflowMetadataForContent()

WorkflowServiceInterface.php : 29
public loadWorkflowMetadataForContent(Content $content[, string|null $name = null ]) : WorkflowMetadata

Parameters

Name Type Default value Description
$content Content - -
$name string|null null -

Return values

WorkflowMetadata

Tags
Throws
NotFoundException

publicloadWorkflowMetadataList()

WorkflowServiceInterface.php : 74
public loadWorkflowMetadataList(WorkflowMetadataQuery $query) : WorkflowMetadataList

Parameters

Name Type Default value Description
$query WorkflowMetadataQuery - -

Return values

WorkflowMetadataList

publicloadWorkflowMetadataOriginatedByUser()

WorkflowServiceInterface.php : 60

Loads all workflow metadata started by $user.

public loadWorkflowMetadataOriginatedByUser(UserReference $user[, string|null $name = null ]) : array<string|int, WorkflowMetadata>

Loading all workflow metadata is highly discouraged, it leads to performance issues. Please use only if you understand the consequences.

Parameters

Name Type Default value Description
$user UserReference - -
$name string|null null -

Return values

array<string|int, WorkflowMetadata>

Tags
Deprecated

This method is deprecated since eZ Platform 3.0 and will be removed in 4.0.

publiclockVersion()

WorkflowServiceInterface.php : 117
public lockVersion(VersionInfo $versionInfo[, int $userId = null ]) : void

Parameters

Name Type Default value Description
$versionInfo VersionInfo - -
$userId int null -
Tags
Throws
BadStateException

publicstart()

WorkflowServiceInterface.php : 37
public start(Content $content[, string|null $name = null ]) : WorkflowMetadata

Parameters

Name Type Default value Description
$content Content - -
$name string|null null -

Return values

WorkflowMetadata

publicunlockVersion()

WorkflowServiceInterface.php : 124
public unlockVersion(VersionInfo $versionInfo) : void

Parameters

Name Type Default value Description
$versionInfo VersionInfo - -
Tags
Throws
UnauthorizedException
Throws
BadStateException
Throws
InvalidArgumentException