Updated: Comment #N
Problem/Motivation
In order to satisfy #2080823: Create API to discover config entities' soft dependencies and use this to present a confirm form on module uninstall, we need to gather all view dependencies for a view. We can currently do this easily for handler plugins (fields, filters, sorts) as the provider is already stored in configuration for each. This was done when we made changes to make it easier to tell missing plugins, but also optional plugins.
So, we basically need to do the same for other Views plugins (display, row, cache, access, etc...) so we can get the plugin provider from configuration.
Proposed resolution
Make sure we add the provider to plugins when they are added to a view. Off the top of my head, we need to add this when a display is added, when the display options form is submitted for plugins, and during the wizard.
Remaining tasks
- find all the places this needs to be added
- add to test coverage
- convert existing configuration files to reflect these changes
User interface changes
None
API changes
None. Maybe having to add provider if you have a default view for a module (although if this view has been saved again or something, we could update this...maybe)?
Comment | File | Size | Author |
---|---|---|---|
#5 | interdiff-2198423-5.txt | 5.66 KB | damiankloip |
#5 | 2198423-5.patch | 13.36 KB | damiankloip |
Comments
Comment #1
damiankloip CreditAttribution: damiankloip commentedTo get the ball rolling; we need something like this.
Comment #3
damiankloip CreditAttribution: damiankloip commentedThat test wasn't broken at all.... (Returning the plugin object instead of the definition).
Comment #5
damiankloip CreditAttribution: damiankloip commentedFixed those failures, and added some test coverage.
Comment #6
dawehnerAwesome!
Comment #7
catchThis is added in several places, we can't figure out provider -> user from type -> perm automatically?
Comment #8
damiankloip CreditAttribution: damiankloip commentedHmm, possibly, then we would need to load the plugin instance in the wizard default options method. Plus we are adding
$display_options['access']['type'] = 'perm';
anyway.Comment #9
catchOK that's not perfect but looks like a bigger refactoring that shouldn't block the dependency issue. Committed/pushed to 8.x, thanks!
Comment #10
damiankloip CreditAttribution: damiankloip commentedYeh. Unfortunately there is a lot of views code that is not perfect :)