owner_block.php 650 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Elgg owner block
  4. * Displays page ownership information
  5. *
  6. * @package Elgg
  7. * @subpackage Core
  8. *
  9. */
  10. elgg_push_context('owner_block');
  11. // groups and other users get owner block
  12. $owner = elgg_get_page_owner_entity();
  13. if ($owner instanceof ElggGroup || $owner instanceof ElggUser) {
  14. $header = elgg_view_entity($owner, array('full_view' => false));
  15. $body = elgg_view_menu('owner_block', array('entity' => $owner));
  16. $body .= elgg_view('page/elements/owner_block/extend', $vars);
  17. echo elgg_view('page/components/module', array(
  18. 'header' => $header,
  19. 'body' => $body,
  20. 'class' => 'elgg-owner-block',
  21. ));
  22. }
  23. elgg_pop_context();