Index

Checklist

MMO\admin\helpers · 1 symbol · generated 5 Oct 2026

class

Checklist

Checklist.php:38

A release checklist: everything to look at before a version is committed or shipped, one box per item -- or one per item and per member, when the team checks it together.

class MMO\admin\helpers\Checklist
Namespace
MMO\admin\helpers
Kept in a JSON file of its own, `{folder}/{name}.json` ([`ChecklistController`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller)): {"version": 4, "updatedAt": "...", "title": "my.oviepro 4.1: review before commit", "description": "...", "board": "my.oviepro-deploy", "boardUrl": "boards/oviepro-deploy", "members": [], "recipe": {...}, // how [`ChecklistBuilder`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/helpers/ChecklistBuilder.md#checklistbuilder) makes the items "types": {"pdf": {"label": "PDF and printing", "icon": "file-pdf"}}, // what each `kind` is called, and its icon "groups": {"General": {"icon": "globe"}}, // a group's icon "items": [{id, group, section, kind, title, detail, url, note, tickets}, ...], "checks": {"<item id>": {"<member, or *>": {"at": "...", "by": "marc"}}}, "release": {"name": "4.1", "startedAt": "...", "startedBy": "marc"}, // the round being checked "history": [{name, startedAt, startedBy, closedAt, closedBy, done, total}, ...]} // the rounds before, last first - An item's `id` is the hash of its group, section and title ([`ItemId`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/helpers/Checklist.md#checklist-itemid)): items are rebuilt whenever the code changes, and what was checked stays checked while its item is still there. - `group` is what the page folds (a library, "pages", "before committing"), `section` a heading inside it (a folder, a page), `kind` what the item is (`code`, `page`, `global`...), `url` where to look. - `tickets` are the ids of the board's tickets the item verifies. A ticket all of whose items are checked is verified ([`tickets`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/helpers/Checklist.md#checklist-tickets)): it gets a label on the board, and can then be moved to done. - Without `members`, an item has one box (`*`). With them, it has one per member, and is done once all are checked. - A checklist is checked again at each release: the first check starts the round (`release`), [`reset`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/helpers/Checklist.md#checklist-reset) closes it -- every box unchecked, a line of `history` saying how far it got. - `note` is a word on the item's section (a page's), `types` and `groups` how the page shows kinds and groups.
$list = new Checklist(['title' => 'acme 2.0', 'items' => [['group' => 'acme', 'section' => 'src', 'title' => 'src/A.php']]]); $id = $list->data['items'][0]['id']; $list->check($id, true, 'marc'); $list->progress(); // ['total' => 1, 'done' => 1, ...]

Index

ANYONEthe key of an item's only box, when the checklist has no members
data
boxes()
check($id, $checked, $by, $member)Check an item, or uncheck it.
Edit($filename, $action, $write) staticRun $action on the checklist of $filename, locked: what it changes is written back when $write.
ids()
isDone($id)
ItemId($group, $section, $title) static
itemsOf($ticket)
Normalize($json) static
NormalizeItems($items) static
progress()
reset($name, $by)Start a new round (a release to check): every box is unchecked, and a line of history says how far the round before got.
setItems($items)Replace the items: what was checked stays checked when its item is still there.
tickets($tickets)
toArray()
__construct($data)

Constants1

ANYONE

the key of an item's only box, when the checklist has no members

const ANYONE = '*'

Properties1

Methods15

boxes()

Checklist.php:144
function boxes(): array
returnsarraywho checks each item: the members, or one box for anyone

check($id, $checked, $by, $member)

Checklist.php:156

Check an item, or uncheck it.

function check(string $id, bool $checked, string $by, ?string $member = null): void
$idstring
$checkedbool
$bystringwho
$member = nullnull | stringwhose box, when the checklist has members
returnsvoid
throwsan unknown item or member

Edit($filename, $action, $write)

staticChecklist.php:57

Run $action on the checklist of $filename, locked: what it changes is written back when $write.

static function Edit(string $filename, callable $action, callable|bool $write = false): mixed
$filenamestring
$actioncallable
$write = falsecallable | bool
returnsmixedwhat $action answers

ItemId($group, $section, $title)

staticChecklist.php:123
static function ItemId(string $group, string $section, string $title): string
$groupstring
$sectionstring
$titlestring
returnsstringan item's id: its group, section and title -- rewording an item starts it again, unchecked
Checklist::ItemId('mmo.core', 'src/entities', 'src/entities/Entity.php (modified)'); // 'a3f1...' (12 characters)

Normalize($json)

staticChecklist.php:74
static function Normalize(array $json): array
$jsonarraya checklist file, or nothing
returnsarraythe checklist with every key; what else the file holds is kept

NormalizeItems($items)

staticChecklist.php:97
static function NormalizeItems(array $items): array
$itemsarray
returnsarraystring, group: string, section: string, kind: string, title: string, detail: string, url: ?string, note: string, tickets: list<string>}> every item with every key, its id computed when it has none; an item without a title is dropped

progress()

Checklist.php:202
function progress(): array
returnsarrayint, done: int, boxes: int, checked: int} items, items done, and boxes when there are members

reset($name, $by)

Checklist.php:179

Start a new round (a release to check): every box is unchecked, and a line of history says how far the round before got.

function reset(string $name, string $by): void
$namestringthe new round's name (4.2), '' for none
$bystringwho
returnsvoid
$list->reset('4.2', 'marc'); // $list->data['history'][0]: ['name' => '4.1', ..., 'done' => 12, 'total' => 40]

setItems($items)

Checklist.php:133

Replace the items: what was checked stays checked when its item is still there.

function setItems(array $items): void
$itemsarray
returnsvoid

tickets($tickets)

Checklist.php:220
function tickets(?array $tickets = null): array
$tickets = nullnull | array
returnsarrayarray{title: string, status: string, total: int, checked: int, verified: bool}> each ticket the items name, with how many of its items are done; one the board does not have is left out when $tickets is given

toArray()

Checklist.php:244
function toArray(): array
returnsarraythe checklist as json wants it: maps stay objects, even empty