To simplify the creation of dependency trees for options, we are introducing a new class; OptionTreeGenerator. It provides a very simple interface. You can call add_option to add a new option and if you specify a parent, it will be added as a child option of that parent. At the end, you can call serialize, which returns 2 useful constructs; a dependency tree with all possible options and paths from parents to reach specified option node, both are used in the frontend to render the form.
1.6 KiB
1.6 KiB