FooterMenu.php 700 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace ColdTrick\SiteAnnouncements;
  3. class FooterMenu {
  4. /**
  5. * add a footer menu item for site announcements
  6. *
  7. * @param string $hook the name of the hook
  8. * @param string $type the type of the hook
  9. * @param \ElggMenuItem[] $returnvalue current returnvalue
  10. * @param array $params supplied params
  11. *
  12. * @return \ElggMenuItem[]
  13. */
  14. public static function register($hook, $type, $returnvalue, $params) {
  15. $returnvalue[] = \ElggMenuItem::factory(array(
  16. 'name' => 'site_announcements',
  17. 'text' => elgg_echo('site_annoucements'),
  18. 'href' => 'announcements/all',
  19. 'is_trusted' => true
  20. ));
  21. return $returnvalue;
  22. }
  23. }