KanbanBoard
MMO\admin\helpers · 1 symbol · generated 5 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):
- Namespace
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 | ||
| 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 | |
| WriteFile($filename, $json) static | Write through a temporary file: a crash never leaves half a file. | |
| __construct($file) |
Properties1
file
- Type
- array
Methods14
comment($ticket, $body, $author, $parent)
KanbanBoard.php:212Add 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:188Move 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 | |
| returns |
ReadFile($filename)
staticKanbanBoard.php:94setLabel($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| returns | array | array> the tickets, by id |
touch()
KanbanBoard.php:127a new version: the page that holds the board sees it changed
| returns | void |
WriteFile($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 |