From 82610a4d1990c3483baf1157d139aa60f787454d Mon Sep 17 00:00:00 2001 From: Jaime Perez <jaime.perez@uninett.no> Date: Fri, 8 Aug 2014 15:56:49 +0200 Subject: [PATCH] aggregator2: add a hook to display a link to the aggregator2 page from the Federation tab. --- modules/aggregator2/hooks/hook_frontpage.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 modules/aggregator2/hooks/hook_frontpage.php diff --git a/modules/aggregator2/hooks/hook_frontpage.php b/modules/aggregator2/hooks/hook_frontpage.php new file mode 100644 index 000000000..a0eedf5dd --- /dev/null +++ b/modules/aggregator2/hooks/hook_frontpage.php @@ -0,0 +1,16 @@ +<?php +/** + * Hook to add the aggregator2 lik to the frontpage. + * + * @param array &$links The links on the frontpage, split into sections. + */ +function aggregator2_hook_frontpage(&$links) { + assert('is_array($links)'); + assert('array_key_exists("links", $links)'); + + $links['federation'][] = array( + 'href' => SimpleSAML_Module::getModuleURL('aggregator2/'), + 'text' => '{aggregator2:aggregator:frontpage_link}', + ); + +} -- GitLab