-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC Shift schema PHP api out of LeftAndMain #348
Comments
Also include moving FormField schema specific logic, we can achieve this with the use of extensions and schema data could be handled by generators. @tractorcow described it to me much more succinctly than I can put into words. |
Would make #240 obsolete |
Yes, the whole idea of moving all the schema out is so we could pull it out of framework entirely when it's not needed (e.g. we built a new admin which doesn't use the schema, or a framework only install) |
Details I discussed with @flamerohr:
|
I think But |
All LeftAndMainFormRequestHandler does is add another URL segment. that could be moved to core FormRequestHandler though. |
True, good point |
Introduction
At the moment the php form schema API is hard-coded into LeftAndMain with the following endpoints:
Recommendation
Instead, I suggest to shift this into LeftAndMainFormRequestHandler. The
schema
method would be moved into this request handler as a defaultallowed_action
.Rationale
Primarily this would flatten and simplify the role of LeftAndMain.
The other aim is to eliminate unnecessary complexity required in routing schema urls. For instance, we need separate schema / methodSchema to resolve the
schema
action for any forms, and potentially more methods would need to be added for different form URLS.Shifting this into a
schema
action on the request handler would automatically provide a schema route for any pre-existing form route.For instance, the schema url
/admin/methodSchema/Modals/remoteCreateForm
would become:
/admin/Modals/remoteCreateForm/schema
The text was updated successfully, but these errors were encountered: