Skip to content
Corex

SubmissionsController

Corex\Config\Submissions\SubmissionsController · class · Config layer

Thin REST boundary for the complete permission-scoped Submissions Inbox.

__construct(SubmissionControllerServices $services, SubmissionRestGateway $gateway)

Section titled “__construct(SubmissionControllerServices $services, SubmissionRestGateway $gateway)”

index(WP_REST_Request $request): WP_REST_Response

Section titled “index(WP_REST_Request $request): WP_REST_Response”

show(WP_REST_Request $request): WP_REST_Response

Section titled “show(WP_REST_Request $request): WP_REST_Response”

trash(WP_REST_Request $request): WP_REST_Response

Section titled “trash(WP_REST_Request $request): WP_REST_Response”

Move one submission to the trash (spec 105). Several go through the bulk routes.

destroy(WP_REST_Request $request): WP_REST_Response

Section titled “destroy(WP_REST_Request $request): WP_REST_Response”

Delete one trashed submission for good (spec 105, US2). Several go through the bulk routes.

restore(WP_REST_Request $request): WP_REST_Response

Section titled “restore(WP_REST_Request $request): WP_REST_Response”

update(WP_REST_Request $request): WP_REST_Response

Section titled “update(WP_REST_Request $request): WP_REST_Response”

addNote(WP_REST_Request $request): WP_REST_Response

Section titled “addNote(WP_REST_Request $request): WP_REST_Response”

reply(WP_REST_Request $request): WP_REST_Response

Section titled “reply(WP_REST_Request $request): WP_REST_Response”

sendReplyAgain(WP_REST_Request $request): WP_REST_Response

Section titled “sendReplyAgain(WP_REST_Request $request): WP_REST_Response”

Sends a reply that did not go another time, as it was written (spec 106, FR-022). The request names the reply and carries nothing else: what is sent is what is kept.

previewReply(WP_REST_Request $request): WP_REST_Response

Section titled “previewReply(WP_REST_Request $request): WP_REST_Response”

The email a reply would be sent as (spec 106, FR-005). It sends nothing and keeps nothing of the reply. The subject is answered as it would be sent: as typed, but for a line break or a length no subject has ({@see SubjectLine}).

keepReplyDraft(WP_REST_Request $request): WP_REST_Response

Section titled “keepReplyDraft(WP_REST_Request $request): WP_REST_Response”

Writes down the reply somebody has begun, for them alone (spec 106, FR-006). Either half may be missing: it is not a reply yet. With neither, there is nothing to keep.

discardReplyDraft(WP_REST_Request $request): WP_REST_Response

Section titled “discardReplyDraft(WP_REST_Request $request): WP_REST_Response”

resend(WP_REST_Request $request): WP_REST_Response

Section titled “resend(WP_REST_Request $request): WP_REST_Response”

emailLog(WP_REST_Request $request): WP_REST_Response

Section titled “emailLog(WP_REST_Request $request): WP_REST_Response”

bulkPreview(WP_REST_Request $request): WP_REST_Response

Section titled “bulkPreview(WP_REST_Request $request): WP_REST_Response”

bulkApply(WP_REST_Request $request): WP_REST_Response

Section titled “bulkApply(WP_REST_Request $request): WP_REST_Response”

createExport(WP_REST_Request $request): WP_REST_Response

Section titled “createExport(WP_REST_Request $request): WP_REST_Response”

exports(WP_REST_Request $request): WP_REST_Response

Section titled “exports(WP_REST_Request $request): WP_REST_Response”

previewExport(WP_REST_Request $request): WP_REST_Response

Section titled “previewExport(WP_REST_Request $request): WP_REST_Response”

advanceExport(WP_REST_Request $request): WP_REST_Response

Section titled “advanceExport(WP_REST_Request $request): WP_REST_Response”

deleteExport(WP_REST_Request $request): WP_REST_Response

Section titled “deleteExport(WP_REST_Request $request): WP_REST_Response”

downloadExport(WP_REST_Request $request): WP_REST_Response

Section titled “downloadExport(WP_REST_Request $request): WP_REST_Response”