events.php 993 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace AU\SuggestedFriends;
  3. /**
  4. * page setup event
  5. */
  6. function pagesetup() {
  7. // add to site links
  8. // if (elgg_is_logged_in()) {
  9. // $item = new \ElggMenuItem('suggested_friends', elgg_echo('suggested_friends:new:people'), 'suggested_friends');
  10. // elgg_register_menu_item('site', $item);
  11. // }
  12. elgg_register_menu_item('page', array(
  13. 'name' => 'suggested_friends_all',
  14. 'text' => elgg_echo('suggested_friends:all'),
  15. 'href' => 'suggested_friends',
  16. 'contexts' => array(
  17. 'suggested_friends'
  18. )
  19. ));
  20. elgg_register_menu_item('page', array(
  21. 'name' => 'suggested_friends_friends',
  22. 'text' => elgg_echo('suggested_friends:friends:only'),
  23. 'href' => 'suggested_friends/friends',
  24. 'contexts' => array(
  25. 'suggested_friends'
  26. )
  27. ));
  28. elgg_register_menu_item('page', array(
  29. 'name' => 'suggested_friends_groups',
  30. 'text' => elgg_echo('suggested_friends:groups:only'),
  31. 'href' => 'suggested_friends/groups',
  32. 'contexts' => array(
  33. 'suggested_friends'
  34. )
  35. ));
  36. }