KanbanBoard
MMO\admin\helpers · 1 symbole · générée le 27 Oct 2026
KanbanBoard
KanbanBoard.php:22A <mmo-kanban> board kept in a JSON file: its data (statuses, labels, categories, people, tickets) and each ticket's discussion. The format BoardController serves (api/boards/{board}.json):
- Espace de noms
MMO\admin\helpers
Index
| file | ||
| comment($ticket, $body, $author, $parent) | Add a comment to a ticket's discussion. | |
| comments($ticket) | ||
| Edit($filename, $action, $write) static | Run $action on the board of $filename, locked: what it changes is written back when $write. | |
| Locked($filename, $action) static | Run $action holding {filename}.lock: one request at a time on a file, so a comment added while the board saves is not lost. | |
| move($ticket, $status) | Move a ticket to $status, stamping it as <mmo-kanban> does when a ticket is dropped in a column of that type. | |
| Normalize($json) static | ||
| OpenLock($lock) static | Open a lock file, made when missing. | |
| ReadFile($filename) static | ||
| roleOf($status) | ||
| roles() | The column each step of a ticket's life is in, whatever the board calls its columns: intake where a ticket enters (Backlog), ready where it waits with its prompt (À faire), doing while it is … | |
| setLabel($ticket, $label, $on) | Give $label to a ticket, or take it away; the board learns the label when it does not know it yet. | |
| statusOfType($type) | ||
| tickets() | ||
| touch() | a new version: the page that holds the board sees it changed | |
| typeOf($status) | ||
| WriteFile($filename, $json) static | Write through a temporary file: a crash never leaves half a file. | |
| __construct($file) |
Propriétés1
file
- Type
- array
Méthodes17
comment($ticket, $body, $author, $parent)
KanbanBoard.php:260Add a comment to a ticket's discussion.
comments($ticket)
KanbanBoard.php:144Edit($filename, $action, $write)
staticKanbanBoard.php:39Run $action on the board of $filename, locked: what it changes is written back when $write.
Locked($filename, $action)
staticKanbanBoard.php:59Run $action holding {filename}.lock: one request at a time on a file, so a comment added while the board saves is not lost. Its folder is created when missing.
move($ticket, $status)
KanbanBoard.php:236Move a ticket to $status, stamping it as <mmo-kanban> does when a ticket is dropped in a column of that type.
Normalize($json)
staticKanbanBoard.php:117OpenLock($lock)
staticKanbanBoard.php:83Open a lock file, made when missing. The web server and a command line both lock the same files, and the one that made it owns it: it is made writable by all, and opened read-only when it is not writable (flock() needs no write access) -- a lock made by the web server before stopped every command at cannot lock.
| $lock | string | |
| retourne |
ReadFile($filename)
staticKanbanBoard.php:94roleOf($status)
KanbanBoard.php:214roles()
KanbanBoard.php:192The column each step of a ticket's life is in, whatever the board calls its columns: intake where a ticket enters (Backlog), ready where it waits with its prompt (À faire), doing while it is worked on (En cours), verify while its checklist proves it (Recette), done (Terminé). The board's roles (at the top of its file) say it; a role it leaves out is found from the statuses' types: the first backlog, the second backlog, the first active, the last active, the first done.
| retourne | array | ?string, ready: ?string, doing: ?string, verify: ?string, done: ?string} each role's status id, null when the board has no column for it |
setLabel($ticket, $label, $on)
KanbanBoard.php:155Give $label to a ticket, or take it away; the board learns the label when it does not know it yet.
statusOfType($type)
KanbanBoard.php:175tickets()
KanbanBoard.php:135| retourne | array | array> the tickets, by id |
touch()
KanbanBoard.php:127a new version: the page that holds the board sees it changed
| retourne | void |
typeOf($status)
KanbanBoard.php:223WriteFile($filename, $json)
staticKanbanBoard.php:105Write through a temporary file: a crash never leaves half a file. The web server writes it: whoever runs it, the file stays editable by hand.
__construct($file)
KanbanBoard.php:26| $file = [] | array |