SubmissionsController
Corex\Config\Submissions\SubmissionsController · class · Config layer
Thin REST boundary for the complete permission-scoped Submissions Inbox.
Public API
Section titled “Public API”__construct(SubmissionControllerServices $services, SubmissionRestGateway $gateway)
Section titled “__construct(SubmissionControllerServices $services, SubmissionRestGateway $gateway)”register(): void
Section titled “register(): void”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.