- Full name:
\App\Infrastructure\Services\Content\Workflow\ContentWorkflowService - This class is marked as final and can't be subclassed
- This class is a Final class
Properties
dfdb
Methods
__construct
Parameters:
| Parameter | Type | Description |
|---|---|---|
$dfdb |
\Qubus\Expressive\Database |
requestReview
public requestReview(string $contentId, string $userId, array $reviewers, string $message = ''): array
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$userId |
string | |
$reviewers |
array | |
$message |
string |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionExceptionException
assignReviewers
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$userId |
string | |
$reviewers |
array |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionExceptionException
approve
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$userId |
string | |
$message |
string |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionExceptionException
requestChanges
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$userId |
string | |
$message |
string |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionExceptionException
publish
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$userId |
string | |
$message |
string |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionExceptionException
completeReview
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$userId |
string | |
$message |
string |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionExceptionException
reviewerCandidates
Throws:
reviewerNames
Parameters:
| Parameter | Type | Description |
|---|---|---|
$reviewerIds |
array | |
$reviewerStatus |
array |
comment
public comment(string $contentId, string $userId, string $body, string|null $parentId = null, array|null $selection = null, string $type = 'editorial'): array
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$userId |
string | |
$body |
string | |
$parentId |
string|null | |
$selection |
array|null | |
$type |
string |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionJsonExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionException
publishScheduled
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string |
Throws:
withdrawReview
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$userId |
string | |
$message |
string |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionExceptionException
activity
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$limit |
int |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionException
comments
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$status |
string |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionException
content
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string |
Throws:
attribute
Parameters:
| Parameter | Type | Description |
|---|---|---|
$json |
?string |
Throws:
updateContent
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$status |
string | |
$attribute |
array |
Throws:
updateComment
Parameters:
| Parameter | Type | Description |
|---|---|---|
$commentId |
string | |
$userId |
string | |
$body |
string |
Throws:
JsonExceptionContainerExceptionInterfaceNotFoundExceptionInterfaceInvalidArgumentExceptionTypeExceptionExceptionReflectionException
replyToComment
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$userId |
string | |
$parentId |
string | |
$body |
string |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionJsonExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionException
resolveComment
Parameters:
| Parameter | Type | Description |
|---|---|---|
$commentId |
string | |
$userId |
string |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionJsonExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionException
reopenComment
Parameters:
| Parameter | Type | Description |
|---|---|---|
$commentId |
string | |
$userId |
string |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionJsonExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionException
deleteComment
Parameters:
| Parameter | Type | Description |
|---|---|---|
$commentId |
string | |
$userId |
string |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionJsonExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionException
commentSummary
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionException
resolveOpenChildComments
Parameters:
| Parameter | Type | Description |
|---|---|---|
$parentId |
string | |
$resolvedAt |
string |
commentById
Parameters:
| Parameter | Type | Description |
|---|---|---|
$commentId |
string |
nestComments
Parameters:
| Parameter | Type | Description |
|---|---|---|
$rows |
array |
log
private log(string $contentId, string $userId, string $type, ?string $fromStatus = null, ?string $toStatus = null, string $message = '', array $metadata = []): string
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$userId |
string | |
$type |
string | |
$fromStatus |
?string | |
$toStatus |
?string | |
$message |
string | |
$metadata |
array |
Throws:
notifyMany
private notifyMany(string $contentId, array $userIds, string $activityId, string $type, string $title, string $body = ''): void
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$userIds |
array | |
$activityId |
string | |
$type |
string | |
$title |
string | |
$body |
string |
Throws:
defaultEditorialUserIds
Parameters:
| Parameter | Type | Description |
|---|---|---|
$excludeUserId |
?string |
normalizeReviewerStatus
Parameters:
| Parameter | Type | Description |
|---|---|---|
$reviewers |
array | |
$existing |
array |
allReviewersComplete
Parameters:
| Parameter | Type | Description |
|---|---|---|
$reviewers |
array | |
$reviewerStatus |
array |
assertWorkflowStage
Parameters:
| Parameter | Type | Description |
|---|---|---|
$workflow |
array | |
$allowedStages |
array|string |
Throws:
assertContentStatus
Parameters:
| Parameter | Type | Description |
|---|---|---|
$content |
array | |
$allowedStatuses |
array|string |
Throws:
assertCan
Parameters:
| Parameter | Type | Description |
|---|---|---|
$permission |
string |
Throws:
ContainerExceptionInterfaceInvalidArgumentExceptionNotFoundExceptionInterfaceReflectionExceptionTypeExceptionException
now
queueEmailNotifications
private queueEmailNotifications(string $contentId, array $userIds, string $title, string $message, string $type = 'Editorial Workflow', string $anchor = 'content-workflow-box'): void
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$userIds |
array | |
$title |
string | |
$message |
string | |
$type |
string | |
$anchor |
string |
Throws:
notifyCommentUsers
private notifyCommentUsers(string $contentId, string $actorUserId, string $activityId, string $body, string|null $parentId = null): void
Parameters:
| Parameter | Type | Description |
|---|---|---|
$contentId |
string | |
$actorUserId |
string | |
$activityId |
string | |
$body |
string | |
$parentId |
string|null |
Throws: