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.

Comments

skyredwang’s picture

StatusFileSize
new1.19 KB
skyredwang’s picture

Status: Active » Needs review
StatusFileSize
new1.24 KB
skyredwang’s picture

Status: Needs review » Needs work

need to support all entities.

skyredwang’s picture

Status: Needs work » Needs review
StatusFileSize
new2.41 KB
amitaibu’s picture

Assigned: Unassigned » roysegall

@RoySegall, can you review it please?

roysegall’s picture

Sure.

roysegall’s picture

Status: Needs review » Needs work

@skyredwang There are white spaces in the patch but except for that - looks fine to me.

roysegall’s picture

@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.

skyredwang’s picture

Status: Needs work » Active

@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?

roysegall’s picture

StatusFileSize
new1.66 KB

I'm attaching a patch which using the standard hook_views_data().

roysegall’s picture

Status: Active » Needs review
amitaibu’s picture

+++ b/includes/views/og_vocab.views.incundefined
@@ -0,0 +1,41 @@
+    if (empty($group_content_entities[$entity_type]) && empty($group_entities[$entity_type])) {
+      continue;

This looks wrong. Why is this check needed?

skyredwang’s picture

Issue summary: View changes
StatusFileSize
new1.97 KB

In this patch, I deleted the unnecessary condition checks.