content.php 569 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * content of the group members widget
  4. */
  5. $widget = $vars["entity"];
  6. $count = (int) $widget->num_display;
  7. if ($count < 1) {
  8. $count = 5;
  9. }
  10. $options = array(
  11. "type" => "user",
  12. "limit" => $count,
  13. "relationship" => "member",
  14. "relationship_guid" => $widget->getOwnerGUID(),
  15. "inverse_relationship" => true,
  16. "list_type" => "gallery",
  17. "gallery_class" => "elgg-gallery-users",
  18. "pagination" => false
  19. );
  20. $list = elgg_list_entities_from_relationship($options);
  21. if (empty($list)) {
  22. $list = elgg_echo("widgets:group_members:view:no_members");
  23. }
  24. echo $list;