Skip to content
Corex

SubmissionTrashStore

Corex\Config\Submissions\SubmissionTrashStore · interface · Config layer

Where a submission is put in the trash and taken out of it (spec 105).

trash(int $id, int $actorId, string $via): void

Section titled “trash(int $id, int $actorId, string $via): void”

Put a trashed submission back as it was.

A trashed submission, shaped as the inbox shapes one, or null when it is not in the trash.

The files that were uploaded with a submission, as attachment ids.

Remove a file that was uploaded with a submission, from disk and from the media records. False when it could not be removed, or is not such a file.

The ids of the email attempts made for a submission: its notifications, and replies to it.

trashedBefore(DateTimeImmutable $cutoff, int $limit): array

Section titled “trashedBefore(DateTimeImmutable $cutoff, int $limit): array”

The submissions that went into the trash before a moment, oldest first.

Take onto CoreX’s clock the submissions WordPress’s own trash holds: give each the date WordPress recorded, and remove the mark WordPress’s clean-up would delete it by.

Delete a trashed submission for good, with everything stored on it. What is stored elsewhere and tied to it is the caller’s to remove first.