SubmissionTrashStore
Corex\Config\Submissions\SubmissionTrashStore · interface · Config layer
Where a submission is put in the trash and taken out of it (spec 105).
Public API
Section titled “Public API”trash(int $id, int $actorId, string $via): void
Section titled “trash(int $id, int $actorId, string $via): void”restore(int $id): void
Section titled “restore(int $id): void”Put a trashed submission back as it was.
findTrashed(int $id): ?array
Section titled “findTrashed(int $id): ?array”A trashed submission, shaped as the inbox shapes one, or null when it is not in the trash.
uploadsOf(int $id): array
Section titled “uploadsOf(int $id): array”The files that were uploaded with a submission, as attachment ids.
forgetUpload(int $attachmentId): bool
Section titled “forgetUpload(int $attachmentId): bool”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.
emailAttemptsOf(int $id): array
Section titled “emailAttemptsOf(int $id): array”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.
adoptWordPressTrash(int $limit): int
Section titled “adoptWordPressTrash(int $limit): int”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(int $id): void
Section titled “delete(int $id): void”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.