Files
summercms/admin/tests/fixtures/settings.json
Jakub Zych 4a9b0896b1 feat(cabana): settings entries that link to an admin controller
pact.SettingsItem gains an additive Controller field, the equivalent of a
WinterCMS registerSettings 'url' => Backend::url(...) entry. A link entry
declares no Model, Form or NewModel and needs no AdminFS; start-up fails
when it combines Controller with a singleton form or a model, or names an
unregistered controller. Settings codes stay one namespace.

GET /settings lists a link entry with its controller only when the
principal passes the item's permissions and may open the controller.
Registry.Setting never returns a link entry, so the singleton settings
endpoints answer 404 for its code. SettingsEntry carries controller,
empty for singletons; the OpenAPI document, generated SPA types and
settings fixture follow, and the pact and cabana READMEs and the
settings docs describe the link.
2026-10-07 18:22:01 +02:00

118 lines
2.4 KiB
JSON

{
"list": {
"data": [
{
"code": "search",
"label": "Search",
"description": "Search engine options",
"icon": "search",
"category": "System",
"keywords": [],
"model": "Acme\\Demo\\Models\\Settings",
"controller": "",
"order": 20
},
{
"code": "mail",
"label": "Mail",
"description": "Outgoing mail",
"icon": "icon-cog",
"category": "System",
"keywords": [],
"model": "Acme\\Demo\\Models\\MailSettings",
"controller": "",
"order": 10
},
{
"code": "branding",
"label": "Branding",
"description": "Logo and colours",
"icon": "palette",
"category": "Appearance",
"keywords": [],
"model": "Acme\\Demo\\Models\\Branding",
"controller": "",
"order": 5
}
],
"meta": {
"locale": "en"
}
},
"schema": {
"data": {
"name": "Search",
"fields": [
{
"name": "use_engine",
"label": "Use the search engine",
"type": "switch",
"default": 0,
"comment": "Queries go to the external engine",
"required": true
},
{
"name": "engine_host",
"label": "Engine host",
"type": "text",
"span": "full"
}
],
"messages": {
"create": {
"other": "New record"
},
"update": {
"other": "Edit record"
},
"saved": {
"other": "Saved"
},
"deleteConfirm": {
"other": "Delete?"
},
"deleted": {
"other": "Deleted"
},
"preview": {
"other": "Record preview"
},
"edit": {
"other": "Edit record"
}
},
"meta": {
"locale": "en"
},
"assets": {
"scripts": [],
"styles": []
},
"redirects": {
"create": {
"redirect": "",
"redirectClose": ""
},
"update": {
"redirect": "",
"redirectClose": ""
},
"default": ""
}
},
"meta": {
"locale": "en"
}
},
"values": {
"data": {
"data": {
"use_engine": 0,
"engine_host": "search.local"
},
"exists": true
},
"meta": {}
}
}