Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This started as a data-retrieving-only function for use in #822554: Views display plugins not marked as dependencies (which is still needed), but I expanded it to mimic the "Fields used in views" report page as well, since I realized it's a really great way to check which Views you remembered to add access checks to, or caching, or where you used mini pagers.
Comment | File | Size | Author |
---|---|---|---|
#6 | views-1686798-6.patch | 3.39 KB | tim.plunkett |
#4 | views-1686798-4.patch | 3.39 KB | tim.plunkett |
#4 | Screen Shot 2012-07-16 at 7.42.25 AM.png | 173.38 KB | tim.plunkett |
#1 | views-1686798-1.patch | 3.53 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettSee attached.
Comment #2
dawehneroh i really like this feature!
I'm wonderding why there is no local variable for this function call.
This call is done for all views and displays
Comment #3
joachim CreditAttribution: joachim commentedWill that get all the plugins types?
What about exposed forms, argument validators, and argument defaults (to name just a few)?
This is going to be a really cool feature -- but a complex one :)
Comment #4
tim.plunkettIt works for display, style, row, access, cache, exposed_form, pager, query, and localization plugin types. I have no idea if it works for display_extenders :)
Because argument validator and argument default plugins are configured per field, I didn't think it was reasonable to recurse that far.
Especially for the use case of features exports, generally they're provided by the same module that provides the field type being used, or they're custom and they're your problem anyway.
I moved views_fetch_plugin_data() outside the loop, even though its statically cached and Views loops over it in other places :)
Also switched to views_get_enabled_views() instead of checking manually.
Here's a screenshot of the page as well:
Comment #5
damiankloip CreditAttribution: damiankloip commentedYep, this is a pretty awesome patch :) Just tested this out, works nicely. The only possible thing I would say is would it be better to have the plugin type first? As this is the alphabetical sort, it makes it easier on the eye to scan as the titles don't end up in order.
Comment #6
tim.plunkettI agree.
Comment #7
damiankloip CreditAttribution: damiankloip commentedRTBC again in that case ;)
Comment #8
dawehnerCommitted to 7.x-3.x and 8.x-3.x