consentAdmin_hook_configpage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
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 8
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 consentAdmin module to the config page.
11
 *
12
 * @param \SimpleSAML\XHTML\Template $template The template that we should alter in this hook.
13
 * @return void
14
 */
15
function consentAdmin_hook_configpage(Template &$template): void
16
{
17
    $template->data['links'][] = [
18
        'href' => Module::getModuleURL('consentAdmin/'),
19
        'text' => Translate::noop('Consent administration'),
20
    ];
21
22
    $template->getLocalization()->addModuleDomain('consentAdmin');
23
}
24