Converting modals from legacy controllers to new DModal component API

Depending on what you need to modify, I think the best solution would be to use a PluginOutlet to inject your custom code, or a PluginOutlet Wrapper to replace/conditionally show the core implementation. (You can PR to add an outlet if its not available)

If you really want to use modifyClass it should be still possible, it’s just that the modal is a component now and its nested in components/modal so you would access it like:

api.modifyClass("component:modal/poll-ui-builder", {
   pluginId: "your-custom-plugin-id",

   // insert custom code
});
4 Likes