Closed (fixed)
Project:
Layout Options
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Mar 2023 at 14:12 UTC
Updated:
22 Mar 2024 at 17:27 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
grimreaperComment #3
grimreaperRegarding the configuration structure:
It should be at each layout plugin using Layout Options to declare its own config schema, something like:
It is not possible to try to generate it dynamically because of the core issue #3070463: Allow adding dynamic configuration schema:
I started something like:
Also the structure of the aved configuration depends its value, multi true or false, see screenshot:
So the dynamic declaration for one layout would require to instanciate the LayoutOptions plugin, parse the layout options declaration for this layout (which logic is in the LayoutOptions plugin and not in the LayoutOptionPluginManager), see the available options and generate the config schema accordingly.
Currently, I will try to provide some base schema type that will be usable by contrib or custom layouts.
And I need to check for layout_options_ui.
Also no need to provide config schema per layout options plugins because all of them save strings.
Comment #6
grimreaperComment #8
anybody@Grimreaper thanks! We just ran into this in two of our modules using .layout_options.yml's.
I think it might make sense to add the best practices and an example of a layout_options.yml and the schema to create for this to the layout_options docs?
Perhaps also a note on the module page might make sense?
Especially because "false" is true in PHP, this can be really risky for boolean values :D