invitationrequest.php 693 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Group view for an invitation request
  4. *
  5. * @uses $vars['entity'] Group entity
  6. */
  7. $user = elgg_get_page_owner_entity();
  8. if (!$user instanceof \ElggUser || !$user->canEdit()) {
  9. return;
  10. }
  11. $group = elgg_extract('entity', $vars);
  12. if (!$group instanceof \ElggGroup) {
  13. return true;
  14. }
  15. $icon = elgg_view_entity_icon($group, 'small');
  16. $menu = elgg_view_menu('invitationrequest', array(
  17. 'entity' => $group,
  18. 'user' => $user,
  19. 'order_by' => 'priority',
  20. 'class' => 'elgg-menu-hz float-alt',
  21. ));
  22. $summary = elgg_view('group/elements/summary', array(
  23. 'entity' => $group,
  24. 'subtitle' => $group->briefdescription,
  25. 'metadata' => $menu,
  26. ));
  27. echo elgg_view_image_block($icon, $summary);