-
Notifications
You must be signed in to change notification settings - Fork 333
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
API Use dynamic config for ModalController forms #3029
API Use dynamic config for ModalController forms #3029
Conversation
const sectionConfigKey = 'SilverStripe\\CMS\\Controllers\\CMSPageEditController'; | ||
const sectionConfigKey = 'SilverStripe\\Admin\\LeftAndMain'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LeftAndMain
now dynamically lists all link forms registered with ModalController.link_modal_form_factories
These do get inherited, so CMSPageEditController
would still work, but it seems sensible to use the more generic controller here (especially since CMSPageEditController
is not long for this world)
'editorInternalLink' => [ | ||
'schemaUrl' => $modalController->Link('schema/editorInternalLink'), | ||
], | ||
'editorAnchorLink' => [ | ||
'schemaUrl' => $modalController->Link('schema/editorAnchorLink/:pageid'), | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These get included in LeftAndMain::getClientConfig()
now instead.
$pageIDField->setValue((int)$context['PageID']); | ||
$pageIDField->setValue((int)$context['ItemID']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was changed to be more generic so we can reuse it in other link forms if needed.
21bf47a
to
1738a21
Compare
1738a21
to
a760dfe
Compare
Remove redundant extension in favour of new functionality in ModalController
Relies on changes in silverstripe/silverstripe-admin#1860
Issue
ModalController
silverstripe-admin#1765