consentSimpleAdmin_hook_configpage()   A
last analyzed

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
declare(strict_types=1);
4
5
use SimpleSAML\Locale\Translate;
6
use SimpleSAML\Module;
7
use SimpleSAML\XHTML\Template;
8
9
/**
10
 * Hook to add the consentSimpleAdmin module to the config page.
11
 *
12
 * @param \SimpleSAML\XHTML\Template &$template The template that we should alter in this hook.
13
 */
14
function consentSimpleAdmin_hook_configpage(Template &$template): void
15
{
16
    $template->data['links'][] = [
17
        'href' => Module::getModuleURL('consentSimpleAdmin/consentAdmin.php'),
18
        'text' => Translate::noop('Consent withdrawal'),
19
    ];
20
    $template->data['links'][] = [
21
        'href' => Module::getModuleURL('consentSimpleAdmin/consentStats.php'),
22
        'text' => Translate::noop('Consent Storage Statistics'),
23
    ];
24
    $template->getLocalization()->addModuleDomain('consentSimpleAdmin');
25
}
26