Passed
Push — master ( c1c7ff...58db11 )
by Tim
10:37 queued 03:25
created

consentSimpleAdmin_hook_configpage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 11
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 cron module to the config page.
9
 *
10
 * @param \SimpleSAML\XHTML\Template &$template The template that we should alter in this hook.
11
 */
12
function consentSimpleAdmin_hook_configpage(Template &$template)
13
{
14
    $template->data['links']['consentsimpleadmin'] = [
15
        'href' => Module::getModuleURL('consentSimpleAdmin/consentAdmin.php'),
16
        'text' => Translate::noop('Consent withdrawal'),
17
    ];
18
    $template->data['links']['consentsimpleadmin_stats'] = [
19
        'href' => Module::getModuleURL('consentSimpleAdmin/consentStats.php'),
20
        'text' => Translate::noop('Consent Storage Statistics'),
21
    ];
22
    $template->getLocalization()->addModuleDomain('consentSimpleAdmin');
23
}
24