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.
At the moment, either starting from base table node
or base table og_vocab
, we cannot show a Group (e.g. name, description, member counts) with its vocabulary IDs.
This is a useful feature.
Comment | File | Size | Author |
---|---|---|---|
#13 | describe_data_to_views_11.patch | 1.97 KB | skyredwang |
#1 | include_views_data.patch | 1.19 KB | skyredwang |
Comments
Comment #1
skyredwangComment #2
skyredwangComment #3
skyredwangneed to support all entities.
Comment #4
skyredwangComment #5
amitaibu@RoySegall, can you review it please?
Comment #6
RoySegall CreditAttribution: RoySegall commentedSure.
Comment #7
RoySegall CreditAttribution: RoySegall commented@skyredwang There are white spaces in the patch but except for that - looks fine to me.
Comment #8
RoySegall CreditAttribution: RoySegall commented@skyredwang sorry for miss lead here, i looked it up a bit more and i think that there is no need for the views controller class, we can use the hook_views_data() instead.
Comment #9
skyredwang@RoySegal, I followed @Amitaibu advice to look into OG code on views integration. The views controller class (used also by OG) isn't necessary for now, but might be useful in the future. This patch is just a start for a simple feature, but other people or me might write more features going forward.
If you think "views controller class" is probably not needed going forward, then we can remove it?
Comment #10
RoySegall CreditAttribution: RoySegall commentedI'm attaching a patch which using the standard hook_views_data().
Comment #11
RoySegall CreditAttribution: RoySegall commentedComment #12
amitaibuThis looks wrong. Why is this check needed?
Comment #13
skyredwangIn this patch, I deleted the unnecessary condition checks.