Index

ChecklistController

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

class

ChecklistController

ChecklistController.php:44

The release checklists: what to look at before a version is committed or shipped, each one a JSON file of

class MMO\admin\controllers\ChecklistController extends MMO\core\classes\aDataController implements MMO\core\interfaces\iRoutable
Namespace
MMO\admin\controllers
Extends
aDataController
Implements
iRoutable
See
$folder (Checklist for the file, ChecklistBuilder for its recipe). {MMO\admin}/pages/checklists shows them.
A checklist may follow a `<mmo-kanban>` board of [`$boards`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-boards) (`board`): its items then name the tickets they verify. Checking the last item of a ticket gives it [`$verifiedLabel`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-verifiedlabel) on the board, unchecking one takes it away; a verified ticket can be moved to the board's first done status, with a comment in its discussion listing what was checked. `build.json` rebuilds the items from the recipe -- the repositories' `git status`, the tickets' result comments and ```` ```check ```` blocks: run it again after a change, what was checked stays checked while its item is still there. A checklist of [`$checklists`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-checklists) is declared by the application: made the first time it is asked for, and built again from its recipe whenever its items file changes (a new version of the application asks other checks) -- what was checked stays checked while its item is there. One may be the page's [`$default`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-default). `reset.json` starts a new round (a release to check): every box unchecked, a line of its history saying how far the last one got. Declared like any controller, with where the files are: "MMO\\admin\\controllers\\ChecklistController": {"folder": "{root}/checklists", "boards": "{root}/boards", "scope": "admin", "checklists": {"general": {"title": "Release checklist", "recipe": {"itemsFile": "{root}/src/checklists/general.json"}}}, "default": "general"} > WARNING: whoever reaches these routes writes the checklists and the boards they follow. Give a [`$scope`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-scope) on any > application served beyond localhost; [`$anonymous`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-anonymous) opens them to whoever calls, logged in or not (mmo.oauth): only > on a development machine, for the agents' `curl`.
curl http://localhost/my.oviepro/api/checklists.json curl -X POST http://localhost/my.oviepro/api/checklists/my.oviepro-4.1/build.json curl -X POST -H 'Content-Type: application/json' -d '{"name": "4.2"}' http://localhost/my.oviepro/api/checklists/general/reset.json curl -X PUT -H 'Content-Type: application/json' -d '{"checked": true}' http://localhost/my.oviepro/api/checklists/my.oviepro-4.1/items/3d332c914651.json

Index

NAMEa name: what its file is called, nothing that leaves the folder
anonymous
author
boards
checklists
default
doneComment
folder
scope
verifiedLabel
answer($route, $list, $saving)
board($list)
ConnectRoutes($routes, $config) static
declare($name)Make a declared checklist when it has no file yet, and bring it up to its declaration: its title, members...
edit($route, $action, $write)Run $action on the route's checklist, locked: what it changes is written back when $write.
fail($route, $status, $error)
getAuthor()
guard($route)
routeBuild($route)Rebuild the items from the recipe: what was checked stays checked while its item is still there.
routeCheck($route)Check an item, or uncheck it: a ticket all of whose items are checked gets $verifiedLabel, and loses it when one is unchecked.
routeDone($route)Move a verified ticket to the board's first done status, and say so in its discussion with what was checked.
routeList($route)
routeLoad($route)
routeReset($route)Start a new round: every box unchecked, a line of the history saying how far the last one got.
routeSave($route)Create a checklist, or change it: what the body gives replaces what the checklist had (items keep their checks).
setBuilt($list, $builder, $declaration)Give a checklist the items $builder builds, and what its items file says besides (members, types, groups' icons): the declaration's own win.
setStatus($route, $status)
syncBoard($list)give $verifiedLabel to the verified tickets, take it from the others the checklist names

Constants1

NAME

a name: what its file is called, nothing that leaves the folder

const NAME = '/^[a-z0-9][a-z0-9._-]{0,99}$/i'

Properties9

anonymous

bool $anonymous = false
Type
bool

boards

?string $boards = '{root}/boards'
Type
null | string

checklists

array $checklists = []
Type
array

doneComment

string $doneComment = '**Release checklist**: verified, moved to **done**.'
Type
string

folder

string $folder = '{root}/checklists'
Type
string

verifiedLabel

array $verifiedLabel = […4 items]
Type
array

Methods18

answer($route, $list, $saving)

ChecklistController.php:225
protected function answer( MMO\core\server\Route $route, MMO\admin\helpers\Checklist $list, int $saving = 0 ): array
$routeRoute
$listChecklist
$saving = 0int1 when the checklist is about to be written: the version it will have
returnsarraythe checklist (Checklist), with name, declared (one of $checklists), progress and, when it follows a board, tickets: each ticket its items name, its title, its status and how many of its items are checked

declare($name)

ChecklistController.php:259

Make a declared checklist when it has no file yet, and bring it up to its declaration: its title, members... and its items, built again when what they come from changed. Written only when something did.

function declare(string $name): void
$namestringone of $checklists
returnsvoid

edit($route, $action, $write)

ChecklistController.php:317

Run $action on the route's checklist, locked: what it changes is written back when $write.

protected function edit(MMO\core\server\Route $route, callable $action, bool $write = false): array
$routeRoute
$actioncallable
$write = falsebool
returnsarraywhat $action answers

routeBuild($route)

ChecklistController.php:147

Rebuild the items from the recipe: what was checked stays checked while its item is still there.

#[MMO\core\attributes\APIRoute('POST|api/checklists/{name}/build.json', 'Rebuild a release checklist\'s items from its recipe', mediaTypes: ['json'])] function routeBuild(MMO\core\server\Route $route): array
$routeRoute
returnsarrayas routeLoad, and build: {orphans, unmatched}: the files no ticket cites, the treated tickets no file names

routeCheck($route)

ChecklistController.php:164

Check an item, or uncheck it: a ticket all of whose items are checked gets $verifiedLabel, and loses it when one is unchecked.

#[MMO\core\attributes\APIRoute('PUT|api/checklists/{name}/items/{item}.json', 'Check an item of a release checklist: {checked, member}', mediaTypes: ['json'])] function routeCheck(MMO\core\server\Route $route): array
$routeRoutea JSON body {checked, member}: member only when the checklist has members
returnsarrayas routeLoad

routeDone($route)

ChecklistController.php:199

Move a verified ticket to the board's first done status, and say so in its discussion with what was checked.

#[MMO\core\attributes\APIRoute('POST|api/checklists/{name}/tickets/{ticket}/done.json', 'Move a release checklist\'s verified ticket to done', mediaTypes: ['json'])] function routeDone(MMO\core\server\Route $route): array
$routeRoute
returnsarrayas routeLoad; 409 when the ticket is not verified

routeList($route)

ChecklistController.php:93
#[MMO\core\attributes\APIRoute('GET|api/checklists.json', 'The release checklists', mediaTypes: ['json'])] function routeList(MMO\core\server\Route $route): array
$routeRoute
returnsarray{default, checklists: [{name, title, description, board, version, updatedAt, release, progress, declared}]}: the declared ones first, in their order, then the last changed first

routeLoad($route)

ChecklistController.php:113
#[MMO\core\attributes\APIRoute('GET|api/checklists/{name}.json', 'A release checklist', mediaTypes: ['json'])] function routeLoad(MMO\core\server\Route $route): array
$routeRoute
returnsarraythe checklist (answer); an unknown one is empty, version 0

routeReset($route)

ChecklistController.php:183

Start a new round: every box unchecked, a line of the history saying how far the last one got.

#[MMO\core\attributes\APIRoute('POST|api/checklists/{name}/reset.json', 'Start a new round of a release checklist, every box unchecked: {name}', mediaTypes: ['json'])] function routeReset(MMO\core\server\Route $route): array
$routeRoutea JSON body {name}: the new round's name (a version), empty for none
returnsarrayas routeLoad

routeSave($route)

ChecklistController.php:124

Create a checklist, or change it: what the body gives replaces what the checklist had (items keep their checks).

#[MMO\core\attributes\APIRoute('PUT|api/checklists/{name}.json', 'Create or change a release checklist: {version, title, description, board, boardUrl, members, recipe, items}', mediaTypes: ['json'])] function routeSave(MMO\core\server\Route $route): array
$routeRoutea JSON body {version, title, description, board, boardUrl, members, recipe, items}: the version the page was given (0 for a new checklist), and what changes
returnsarrayas routeLoad; 409 with the checklist as it is when it was saved meanwhile

setBuilt($list, $builder, $declaration)

ChecklistController.php:286

Give a checklist the items $builder builds, and what its items file says besides (members, types, groups' icons): the declaration's own win.

protected function setBuilt( MMO\admin\helpers\Checklist $list, MMO\admin\helpers\ChecklistBuilder $builder, array $declaration = [] ): void
$listChecklist
$builderChecklistBuilder
$declaration = []arrayas $checklists
returnsvoid
Inherited members (62)
ConstantsDeclared byDescription
ALERTiLogLevelAlert: Action must be taken immediately.
ALLiLogLevelMask for all
ALL_PLUSiLogLeveldebug everything
BACKTRACEiLogLevel
COLORSaDataControllerNamed color palettes for chart/report endpoints, e.g.
CRITICALiLogLevelCritical: Critical conditions.
DEBUGiLogLevelDebug: Detailed debug information.
DEEPiLogLeveldebug everything with arguments
EMERGENCYiLogLevelEmergency: System is unusable.
ERRORiLogLevelError: Runtime errors that do not require immediate action but should typically be logged and monitored.
ERROR_PLUSiLogLevelMask for all error
FATALiLogLevelMask for all fatal error
INFOiLogLevelInfo: Interesting events.
INFO_PLUSiLogLevelMask for all errors/warning/notices/info
MEMORYiLogLevelinclude backtrace object
NOTICEiLogLevelNotice: Normal but significant events.
NOTICE_PLUSiLogLevelMask for all errors/warning/notices/info
TRACEiLogLevelinclude backtrace as origins
WARNINGiLogLevelWarning: Exceptional occurrences that are not errors.
WARNING_PLUSiLogLevelMask for all errors and warnings
PropertiesDeclared byDescription
repositoriesaDataController
verbosityaModule
MethodsDeclared byDescription
alert($message, $context)aModuleAction must be taken immediately.
backtraces($message, $context)aModuleForce-log a message at INFO level together with a full stack trace/memory snapshot (iLogLevel::BACKTRACE), bypassing the verbosity mask entirely (any non-zero verbosity is enough to trigger it).
Configure($config)aModuleMerge $config into this module's configuration in the shared Configuration.
critical($message, $context)aModuleCritical conditions. No-op if CRITICAL is currently filtered out by the verbosity mask.
debug($message, $context)aModuleDetailed debug information.
debugName()aModuleHuman-readable identifier used as the default {origin} in this instance's log messages.
DefaultConfig()aModuleThe config a module starts from before anything loaded via Configuration is merged in.
emergency($message, $context)aModuleSystem is unusable. No-op if EMERGENCY is currently filtered out by the verbosity mask.
error($message, $context)aModuleRuntime errors that do not require immediate action but should typically be logged and monitored.
ExtractRoutes($config)aControllerExtract all the APIRoute from this class, regardless of the fact they are registered in the application
getMainRepository()aDataController
getRepositories()aDataController
getRepository($repo)aDataController
getVerbosity()aModule
HasRoutes()aControllerTells if any APIRoute are registered in the application
info($message, $context)aModuleInteresting events. No-op if INFO is currently filtered out by the verbosity mask.
Instantiate($config)aModule(Re)create the shared instance immediately, configured with $config merged into the class's existing config.
IsShared()aModule
Link($method, $data)aControllerBuild a Link (URL + label/icon/description/title, taken from the route's APIRoute metadata) for a registered route.
log($level, $message, $context)aModuleLogs with an arbitrary level.
notice($message, $context)aModuleNormal but significant events.
offsetExists($key)aModule\ArrayAccess::offsetExists -- tells whether $key is a declared property at all, regardless of whether it is currently readable/writable through array access.
offsetGet($key)aModule\ArrayAccess::offsetGet -- reads a property directly, unless it has a #[Serialize(serialize: 'methodName')] attribute, in which case that zero-argument method is called instead (e.g.
offsetSet($key, $value)aModule\ArrayAccess::offsetSet -- sets a property directly, unless it has a #[Serialize(unserialize: 'methodName')] attribute, in which case that method is called with $value instead (e.g.
offsetUnset($key)aModule\ArrayAccess::offsetUnset -- equivalent to $module[$key] = null.
onRoute($route)aDataControllerSame as aController::onRoute, plus forcing the response to JSON (Response::Json) for every route this controller claims.
Route($method)aControllerGet a registered APIRoute WARNING: if this class was not registered in the application, it will return null.
Routes()aControllerGet a list of registered APIRoutes (from this class) in the application WARNING: if this class was not registered in the application, it will return an empty array.
serialize($path, $serializer)aModule\MMO\core\interfaces\iSerializable::serialize -- exports every property (via
setRepositories($repositories)aDataControllerRegister the repositories this controller can query, keyed by name (e.g.
setVerbosity($verb)aModuleSet the current verbosity mask, replacing whatever it was before.
Shared()aModuleGet the shared instance, creating (and configuring) it on first call.
testVerbosity($level)aModuleTest whether a given level (or set of levels) is currently enabled by this instance's verbosity mask.
traitUnshare($serialize)aModuleRemove the shared instance, so the next Shared() call creates a fresh one.
unserialize($data, $path, $instances)aModule\MMO\core\interfaces\iSerializable::unserialize -- merges $data onto DefaultConfig, runs it through the (possibly overridden) constructor, then applies each resulting value to its property (via
Unshare($serialize)aModuleLike tSingleton::Unshare, but also disconnects this module's instance from every event it was listening to (via Event::DisconnectListeners) before dropping it.
Url($method, $data)aControllerBuild the URL for a registered route, filling in any {placeholder} from $data.
warning($message, $context)aModuleExceptional occurrences that are not errors.
__construct($config)aModuleprotected constructor, so it is not possible to do new Module(...) called by the serialization process just before being injected with data.
__wakeup()aControllerCalled automatically right after the controller's shared instance is built (aModule::unserialize): registers onRoute as a Route listener with a low priority (-10), so it…