Skip to main content

Module generate

Module generate 

Source
Expand description

The pages of today’s settings, generated from their declarations: a scope from the setting id’s prefix (appearance.* to Interface, input.* to Input, developer.* to Developer, the rest to General), a section per settings section (the owner’s title, or an alter hook’s), a field per setting. No hand-written page.

Structs§

Entry
A setting as the generator takes it: its id and its section’s title.

Constants§

SCOPES
The default scopes: id, title, icon, order. The orders leave room between them, so an application’s scopes take their place in the note’s order (section 6: Library 30, Storage 40, Backup 50, Import and export 60, Hardware 70, Plugins 80, Health 90, Jobs 100), Developer last.

Functions§

scope_of
The scope a setting goes to by default.
settings
The manifest of the settings: the default scopes, a section per (scope, section title) in the settings’ order.
slug
A section id from its title: lower case, words joined by -.