-
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
Increase getSchemaRequested/getSchemaResponse to public methods #240
Comments
What use case needs |
So the use case I have at the moment is content review, which adds some functionality to CMSPageEditController via a LeftAndMainExtension. I suppose that two immediate possibilities that don't involve changing the visibility in LeftAndMain could be to increase the visibility in the LeftAndMainExtension instead, or to use entirely separate controllers instead of extending the CMS controller. |
I'd rather move it out of LeftAndMain altogether. What about putting it in FormSchema? |
getSchemaRequested is 2 lines; I'm not worried so much if someone has to inline this somewhere. |
This logic needs to be shifted out of LeftAndMain, and I would prefer to put it into LeftAndMainFormRequestHandler which is where all form-schema response handling should be done. The forms themselves are the natural delegates for handling their own schema. |
Controllers that want to use the new React form builder style APIs can use
LeftAndMain::getSchemaRequested
and::getSchemaResponse
to help with the client app communication.Extensions to LeftAndMain controllers can't though because they're protected methods.
As a result, you see examples like this happening instead.
At this stage I can only see asset-admin will be affected by this in core packages.
Related issues
getSchemaRequested()
andgetSchemaResponse()
) silverstripe-contentreview#214The text was updated successfully, but these errors were encountered: