CoolCMS API

WorkListArchiveFormTrait

Archives a job (`WorkList`) and restores it from the archive.

The RBAC key :Admin:Company:WorkList:archive hides both buttons in listing__head; the server enforces :Api:Company:WorkList:archive for both directions.

Archiving is a plain confirmation signal (full navigation plus a data-grid-confirm dialog). Restoring has a "reason" field (stored in history), so it uses a modal with a real form: opening (unarchiveModal!) is an AJAX signal on the shared ModalWindow, but the submit is a full navigation, because restoring changes most of the page (badge, buttons, read-only mirror of all work sheets) and reloading is simpler than patching dozens of places.

Terminology: WorkList is a job, WorkSheet is a work sheet inside a job.

Table of Contents

Methods

handleArchive()  : void
Archives the job (`open` to `archived`); ends the job, it is not an invoicing action.
handleUnarchiveModal()  : void
Opens the "restore from archive" modal with a reason field (AJAX).
createComponentUnarchiveForm()  : Form
buildUnarchiveModalContent()  : string
processUnarchive()  : void

Methods

handleArchive()

Archives the job (`open` to `archived`); ends the job, it is not an invoicing action.

public handleArchive() : void
Attributes
#[Requires]
$methods: 'POST'

handleUnarchiveModal()

Opens the "restore from archive" modal with a reason field (AJAX).

public handleUnarchiveModal() : void

processUnarchive()

private processUnarchive(string|null $reason) : void
Parameters
$reason : string|null
On this page

Search results