Problem/Motivation
In #2962525: Create a field widget for the Media library module, a new view is added that is used to select entities for an entity reference field. To improve the UX of this view, we modified an exposed filter that used the "bundle" filter plugin to only show bundles that were allowed by the field. Additionally, we added a new filter to the view using "hook_views_query_alter" that used an "IN" operator to reduce the output of the view to entities that were of an allowed bundle.
The Entity Browser module has also attempted to add this functionality generically in #2865928: Provide method for views widget to filter based on context, so it seems like this kind of functionality would be nice for multiple use cases.
Proposed resolution
Support contextually filtering a view by a list of allowed bundles, either in a new filter or contextual filter.
Remaining tasks
Write a patch.
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #13
smustgrave commentedThank you for sharing your idea for improving Drupal.
We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!