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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

skyredwang’s picture

FileSize
1.19 KB
skyredwang’s picture

Status: Active » Needs review
FileSize
1.24 KB
skyredwang’s picture

Status: Needs review » Needs work

need to support all entities.

skyredwang’s picture

Status: Needs work » Needs review
FileSize
2.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

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
FileSize
1.97 KB

In this patch, I deleted the unnecessary condition checks.