- Issue created by @marcus_johansson
- 🇩🇪Germany marcus_johansson
I think extending on this discussion is if we should use this to create derivatives of the original plugin. My initial thought was just to set this for security purposes, for values or setups that might be needed to use the tools, but they could be set elsewhere as well, since the tool belongs in a module in the end. But discussing this with @michaellander he showed how this can be much bigger than this.
So take this example ✨ Create a tool that lists plugin definitions Active
For a Drupal developer this makes sense that you could create derivatives, so you do not rewrite code unneccesarily. We could easily create a Field Type listing for instance that is a config derivative of the plugin definition tool. On that tool you could even set that could allow you to set the permissions needed to use it, for a specific deriative, something that otherwise might be hard to figure out.
It should probably be an interface that is optional, or maybe that makes it not usable to be a base tool, but a tool that always have to be extended via the GUI.
So one example how the Field Type listing tool would work:
1. You would go to some path, where you can "Create Tool"
2. In the list of base tools you would choose "Plugin Manager Listing"
3. In the parameter Plugin Manager you would be able to use a required select list to pick the Plugin Manager of choice.
4. Ajax would load the attribute values you can pick from via checkboxes, id would be autopicked.
5. You can pick the permission needed to run this tool you create.
6. In this case you can choose if you want to show and header
7. You have to write your own function name and description.
8. From other parameters that the deriative tool has picked as optional, you can choose to expose them, autofill them or ignore them.
9. You click save - the tool is available.The only thing is that it might be a lot harder to read and understand the underlying code? The thought model of having one tool, map to one file of code is something that goes back to procedural programming and opens up the possibility for more people to understand what is happening.
The question is if we should do this, or if we should live that there a tool file for everything.