Here's my scenario:
I'm working on a module that dynamically generates the views in hook_views_default_views() using EVA displays. Currently, there is a validation error if no bundles are selected. Rather than validating that at least one bundle is selected, it is often custom to apply all bundles if none are selected, and that's my suggestion. In my case, that would help reduce some code on my end having to load entity info to select all available bundles in by view import. I'll have a patch for this shortly.
By the way, good job on this module. It seems well written and stable. I noticed the issue queue is a bit backed up (I know it's always hard to find time to maintain your modules), so I'd be willing to help fix some bugs if you need it. My company should be happy to sponsor my work on it since we'll be using it on our new site.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | eva-select-all-bundles-1619994-1.patch | 1.61 KB | jordojuice |
Comments
Comment #1
jordojuice commentedAnd here's the patch. It just replaces the views option validation (checking that a bundle is selected) with automatically selecting all bundles if none are chosen.
Comment #2
mkadin commentedThis is a good idea, but I've done the implementation a little bit differently. The patch in #1 will apply the EVA view to all bundles that exist when the view is saved, but if another bundle is added, it won't get the attached view. I also added some terminology changes.
Thanks for the idea, you'll find these latest changes in the dev package soon.
Comment #4
EmanueleQuinto commentedIf you want this in '7.x-1.2' you can apply the patch directly from the commit (
git apply).