- Issue created by @tylertech-lee-hazlett
- Merge request !108Add Support for Available on Current Domain to any Entity Type → (Open) created by tylertech-lee-hazlett
10.3.2
2.0.x-dev
A user installs a module with an entity and needs to add the Available on Current Domain filter to a view for an entity type that is installed with that module. If I add field_domain_access and field_domain_all_affiliates, I want to use the Available on Current Domain filter.
Available on Current Domain filter is hard-coded to be only available for `node` entities.
1. Enable a module: group, media, etc
2. Create a view for group or media
3. Try to add Available on Current Domain filter
4. Not available in filter list
1. In domain_access.module, in hook method domain_access_views_data_alter(), iterate entity types via entity type manager interface and add the Available on Current Domain for all available entity types.
2. In DomainAccessCurrentAllFilter.php, alter the query() method to check if the `table` is `field_domain_access`, and `explode` on `__` to get the base entity type and replace the hard-coded `node` value.
Active
2.0
Code