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