Passed
Push — master ( f721d3...12ba26 )
by Tim
02:11
created

aggregator2_hook_configpage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
rs 10
1
<?php
2
3
use SimpleSAML\Locale\Translate;
4
use SimpleSAML\Module;
5
use SimpleSAML\XHTML\Template;
6
7
/**
8
 * Hook to add the aggregator2 link to the frontpage.
9
 *
10
 * @param \SimpleSAML\XHTML\Template &$template The template that we should alter in this hook.
11
 */
12
function aggregator2_hook_configpage(Template &$template): void
13
{
14
    $template->data['links']['federation'] = [
15
        'href' => Module::getModuleURL('aggregator2/'),
16
        'text' => Translate::noop('Aggregators'),
17
    ];
18
    $template->getLocalization()->addModuleDomain('aggregator2');
19
}
20