Developers

Submission

Whenever you're dealing with a submission in your template, you're actually working with a Submission object.

Properties

id

Type: int|null

The ID of the submission.

owner

Type: craft\elements\Entry|null

The Entry (opens new window) this submission was made on.

ownerId

Type: int|null

The Entry (opens new window) ID this submission was made on.

ownerSiteId

Type: int|null

The site ID for the entry this submission was made on.

isComplete

Type: bool|null

Whether the submission is considered complete. This can be done only through approving or revoking a submission.

isPending

Type: bool|null

Whether the submission is considered pending (a submission is currently waiting for approval/review).

dateCreated

Type: DateTime|null

The date this submission was submitted by an editor.

Methods

getReviews()

Returns: array

Returns a collection of Review objects.

getLastReview()

Returns: verbb\workflow\models\Review|null

Returns the most recent (last-submitted) Review.

In additon, there are several other attributes and functions that are set at the submission level, but they in fact target the last (current) Review. They are available here for convenience.

editor

Type: craft\elements\User|null

The user as the editor role, if applicable to the most recent (last-submitted) Review.

editorId

Type: int|null

The ID of the user as the editor role, if applicable to the most recent (last-submitted) Review.

reviewer

Type: craft\elements\User|null

The user as the reviewer role, if applicable to the most recent (last-submitted) Review.

reviewerId

Type: int|null

The ID of the ruser as the eviewer role, if applicable to the most recent (last-submitted) Review.

publisher

Type: craft\elements\User|null

The user as the publisher role, if applicable to the most recent (last-submitted) Review.

publisherId

Type: int|null

The ID of the user as the publisher role, if applicable to the most recent (last-submitted) Review.

notes

Type: string|null

The notes of this most recent (last-submitted) Review.

status

Type: string|null

The status of this most recent (last-submitted) Review.

role

Type: string|null

The role of this most recent (last-submitted) Review.